<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>EquTemper: ETSubItem.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="$relpath<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="$relpath<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>/search.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<div id="top"><!-- do not remove this div! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">EquTemper&#160;<span id="projectnumber">1.01</span></div>
   <div id="projectbrief">An equation editor.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<script type="text/javascript">
function hasClass(ele,cls) {
  return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)'));
}

function addClass(ele,cls) {
  if (!this.hasClass(ele,cls)) ele.className += " "+cls;
}

function removeClass(ele,cls) {
  if (hasClass(ele,cls)) {
    var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)');
    ele.className=ele.className.replace(reg,' ');
  }
}

function toggleVisibility(linkObj) {
 var base = linkObj.getAttribute('id');
 var summary = document.getElementById(base + '-summary');
 var content = document.getElementById(base + '-content');
 var trigger = document.getElementById(base + '-trigger');
 if ( hasClass(linkObj,'closed') ) {
   summary.style.display = 'none';
   content.style.display = 'block';
   trigger.src = 'open.png';
   removeClass(linkObj,'closed');
   addClass(linkObj,'opened');
 } else if ( hasClass(linkObj,'opened') ) {
   summary.style.display = 'block';
   content.style.display = 'none';
   trigger.src = 'closed.png';
   removeClass(linkObj,'opened');
   addClass(linkObj,'closed');
 }
 return false;
}
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('_e_t_sub_item_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">ETSubItem.h</div>  </div>
</div>
<div class="contents">
<a href="_e_t_sub_item_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* ========================================================================= */</span>
<a name="l00002"></a>00002 <span class="comment">/* ------------------------------------------------------------------------- */</span><span class="comment"></span>
<a name="l00003"></a>00003 <span class="comment">/*!</span>
<a name="l00004"></a>00004 <span class="comment">  \file         ETSubItem.h</span>
<a name="l00005"></a>00005 <span class="comment">  \date         september 2011</span>
<a name="l00006"></a>00006 <span class="comment">  \author       TNick</span>
<a name="l00007"></a>00007 <span class="comment"></span>
<a name="l00008"></a>00008 <span class="comment">  \brief        Contains the definition for ETSubItem class</span>
<a name="l00009"></a>00009 <span class="comment"></span>
<a name="l00010"></a>00010 <span class="comment"></span>
<a name="l00011"></a>00011 <span class="comment">  Copyright (c) 2011, Nicu Tofan</span>
<a name="l00012"></a>00012 <span class="comment"> All rights reserved.</span>
<a name="l00013"></a>00013 <span class="comment"></span>
<a name="l00014"></a>00014 <span class="comment"> Redistribution and use in source and binary forms, with or without</span>
<a name="l00015"></a>00015 <span class="comment"> modification, are permitted provided that the following conditions are met:</span>
<a name="l00016"></a>00016 <span class="comment"> * Redistributions of source code must retain the above copyright</span>
<a name="l00017"></a>00017 <span class="comment">   notice, this list of conditions and the following disclaimer.</span>
<a name="l00018"></a>00018 <span class="comment"> * Redistributions in binary form must reproduce the above copyright</span>
<a name="l00019"></a>00019 <span class="comment">   notice, this list of conditions and the following disclaimer in the</span>
<a name="l00020"></a>00020 <span class="comment">   documentation and/or other materials provided with the distribution.</span>
<a name="l00021"></a>00021 <span class="comment"> * Neither the name of the copyright holder nor the</span>
<a name="l00022"></a>00022 <span class="comment">   names of its contributors may be used to endorse or promote products</span>
<a name="l00023"></a>00023 <span class="comment">   derived from this software without specific prior written permission.</span>
<a name="l00024"></a>00024 <span class="comment"></span>
<a name="l00025"></a>00025 <span class="comment"> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS &quot;AS IS&quot; AND</span>
<a name="l00026"></a>00026 <span class="comment"> ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</span>
<a name="l00027"></a>00027 <span class="comment"> WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</span>
<a name="l00028"></a>00028 <span class="comment"> DISCLAIMED. IN NO EVENT SHALL NICU TOFAN BE LIABLE FOR ANY</span>
<a name="l00029"></a>00029 <span class="comment"> DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES</span>
<a name="l00030"></a>00030 <span class="comment"> (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;</span>
<a name="l00031"></a>00031 <span class="comment"> LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</span>
<a name="l00032"></a>00032 <span class="comment"> ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span>
<a name="l00033"></a>00033 <span class="comment"> (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</span>
<a name="l00034"></a>00034 <span class="comment"> SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span>
<a name="l00035"></a>00035 <span class="comment"></span>
<a name="l00036"></a>00036 <span class="comment">*/</span>
<a name="l00037"></a>00037 <span class="comment">/* ------------------------------------------------------------------------- */</span>
<a name="l00038"></a>00038 <span class="comment">/* ========================================================================= */</span>
<a name="l00039"></a>00039 <span class="preprocessor">#ifndef __ETSUBITEM_INC__</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#define __ETSUBITEM_INC__</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="comment">//</span>
<a name="l00042"></a>00042 <span class="comment">//</span>
<a name="l00043"></a>00043 <span class="comment">//</span>
<a name="l00044"></a>00044 <span class="comment">//</span>
<a name="l00045"></a>00045 <span class="comment">/*  INCLUDES    ------------------------------------------------------------ */</span>
<a name="l00046"></a>00046 
<a name="l00047"></a>00047 <span class="preprocessor">#include    &lt;<a class="code" href="main_8h.html" title="Contains global definitions for application.">main.h</a>&gt;</span>
<a name="l00048"></a>00048 
<a name="l00049"></a>00049 <span class="keyword">class       </span><a class="code" href="class_e_t_i___cplx_txt.html" title="class representing a complex text; this may or may not represent an equation">ETI_CplxTxt</a>;
<a name="l00050"></a>00050 <span class="keyword">class       </span><a class="code" href="class_e_t_sheet_view.html" title="Widget capable of displaying an ETSheet content.">ETSheetView</a>;
<a name="l00051"></a>00051 <span class="keyword">class       </span><a class="code" href="class_e_t_sheet.html" title="Class representing logical root for all elements contained in a document (sheet)">ETSheet</a>;
<a name="l00052"></a>00052 
<a name="l00053"></a>00053 <span class="preprocessor">#include    &lt;QFont&gt;</span>
<a name="l00054"></a>00054 <span class="preprocessor">#include    &lt;QBrush&gt;</span>
<a name="l00055"></a>00055 <span class="preprocessor">#include    &lt;QPointF&gt;</span>
<a name="l00056"></a>00056 <span class="preprocessor">#include    &lt;QRectF&gt;</span>
<a name="l00057"></a>00057 <span class="preprocessor">#include    &lt;QColor&gt;</span>
<a name="l00058"></a>00058 <span class="preprocessor">#include    &lt;QPainter&gt;</span>
<a name="l00059"></a>00059 <span class="preprocessor">#include    &lt;QKeyEvent&gt;</span>
<a name="l00060"></a>00060 <span class="preprocessor">#include    &lt;QDomElement&gt;</span>
<a name="l00061"></a>00061 
<a name="l00062"></a>00062 <span class="preprocessor">#include    &lt;<a class="code" href="cc__l2d_8h.html" title="Contains the definition of CC_L2D class and related.">generic/cc_l2d.h</a>&gt;</span>
<a name="l00063"></a>00063 
<a name="l00064"></a>00064 <span class="comment">/*  INCLUDES    ============================================================ */</span>
<a name="l00065"></a>00065 <span class="comment">//</span>
<a name="l00066"></a>00066 <span class="comment">//</span>
<a name="l00067"></a>00067 <span class="comment">//</span>
<a name="l00068"></a>00068 <span class="comment">//</span>
<a name="l00069"></a>00069 <span class="comment">/*  CLASS    --------------------------------------------------------------- */</span>
<a name="l00070"></a>00070 <span class="comment"></span>
<a name="l00071"></a>00071 <span class="comment">/// class representing the common interface exposed by all sub-items of a ETI_CplxTxt</span>
<a name="l00072"></a>00072 <span class="comment"></span><span class="comment">/**</span>
<a name="l00073"></a>00073 <span class="comment">*   Sub-items are separate units that share a common interface despite</span>
<a name="l00074"></a>00074 <span class="comment">*   various levels of complexity. Sub-items may contain other sub-items,</span>
<a name="l00075"></a>00075 <span class="comment">*   may display text, symbols or other elements.</span>
<a name="l00076"></a>00076 <span class="comment">*</span>
<a name="l00077"></a>00077 <span class="comment">*   \section create_destroy Creating and deleting sub-items</span>
<a name="l00078"></a>00078 <span class="comment">*   Sub-items are created either from direct user action, when new commer</span>
<a name="l00079"></a>00079 <span class="comment">*   is placed at current cursor position, and indirectly, when a new</span>
<a name="l00080"></a>00080 <span class="comment">*   ETI_CplxTxt item is created or when a certain key (+, -, /) is pressed</span>
<a name="l00081"></a>00081 <span class="comment">*   while editing an existing sub-item.</span>
<a name="l00082"></a>00082 <span class="comment">*</span>
<a name="l00083"></a>00083 <span class="comment">*   The constructor of an sub-item simply brings the internal data in a known</span>
<a name="l00084"></a>00084 <span class="comment">*   state. All further initialization is performed by the caller, depending</span>
<a name="l00085"></a>00085 <span class="comment">*   on particular case. This extends to items inheriting from ETSubItem.</span>
<a name="l00086"></a>00086 <span class="comment">*</span>
<a name="l00087"></a>00087 <span class="comment">*   The destructor currently has no assignment as the class does not dynamic</span>
<a name="l00088"></a>00088 <span class="comment">*   memory allocation. It also does not extract itself from the parent chain</span>
<a name="l00089"></a>00089 <span class="comment">*   and does not trigger an update of the parent item.</span>
<a name="l00090"></a>00090 <span class="comment">*</span>
<a name="l00091"></a>00091 <span class="comment">*   \section relations Logic relations</span>
<a name="l00092"></a>00092 <span class="comment">*   Each ETSubItem belongs to an unidimensional chain. As such, it keeps</span>
<a name="l00093"></a>00093 <span class="comment">*   track of it&#39;s predecessor (retrieved via prev() function) and of</span>
<a name="l00094"></a>00094 <span class="comment">*   it&#39;s successor (and one may use next() to find the successor). The</span>
<a name="l00095"></a>00095 <span class="comment">*   functions return NULL if the item is last or first in the chain.</span>
<a name="l00096"></a>00096 <span class="comment">*</span>
<a name="l00097"></a>00097 <span class="comment">*   The sub-items keep a pointer and a flag to keep track of their parents.</span>
<a name="l00098"></a>00098 <span class="comment">*   A sub-item that returns true for isTopLevel() will store internally</span>
<a name="l00099"></a>00099 <span class="comment">*   a pointer to the ETI_CplxTxt hosting this sub-item. This may be retrieved</span>
<a name="l00100"></a>00100 <span class="comment">*   by calling fatherCplx(), but be aware that, for sub-items parented in</span>
<a name="l00101"></a>00101 <span class="comment">*   other sub-items, this can be costly, as the entire parent-son chain</span>
<a name="l00102"></a>00102 <span class="comment">*   needs to be iterated to find top-level sub-item.</span>
<a name="l00103"></a>00103 <span class="comment">*</span>
<a name="l00104"></a>00104 <span class="comment">*   Eventual sub-item parent may be found using fatherSubI(), that returns NULL</span>
<a name="l00105"></a>00105 <span class="comment">*   for items that have isTopLevel() true.</span>
<a name="l00106"></a>00106 <span class="comment">*</span>
<a name="l00107"></a>00107 <span class="comment">*   setFather() is not intended for re-parenting. In fact, this capability</span>
<a name="l00108"></a>00108 <span class="comment">*   is not implemented, yet. The function only stores the provided pointer</span>
<a name="l00109"></a>00109 <span class="comment">*   and sets the flags according to the type. It does not inform the</span>
<a name="l00110"></a>00110 <span class="comment">*   parent, it does not trigger a recompute in the parent and nothing</span>
<a name="l00111"></a>00111 <span class="comment">*   that like.</span>
<a name="l00112"></a>00112 <span class="comment">*</span>
<a name="l00113"></a>00113 <span class="comment">*   \section coordinates The coordinate system. Reference point.</span>
<a name="l00114"></a>00114 <span class="comment">*   Each sub-item must define it&#39;s own reference point. This may be placed</span>
<a name="l00115"></a>00115 <span class="comment">*   anywhere, both inside or outside the area it actually uses (may be</span>
<a name="l00116"></a>00116 <span class="comment">*   outside it&#39;s bounding box). All elements are represented in this coordinate</span>
<a name="l00117"></a>00117 <span class="comment">*   system. The ETSubItem is the only one that is aware of the location of it</span>
<a name="l00118"></a>00118 <span class="comment">*   inside it&#39;s box.</span>
<a name="l00119"></a>00119 <span class="comment">*</span>
<a name="l00120"></a>00120 <span class="comment">*   The parent of the sub-item stores a single value to indicate the position.</span>
<a name="l00121"></a>00121 <span class="comment">*   This value represents the X (horizontal) or Y position of the reference point</span>
<a name="l00122"></a>00122 <span class="comment">*   expressed in parent&#39;s coordinate system and may be retrieved by using</span>
<a name="l00123"></a>00123 <span class="comment">*   posX() function. The parent that will place all sub-items</span>
<a name="l00124"></a>00124 <span class="comment">*   in a row to the same Y (vertical) position has no need to store</span>
<a name="l00125"></a>00125 <span class="comment">*   that in each item. This value is the only one that is an exception to</span>
<a name="l00126"></a>00126 <span class="comment">*   previously mentioned rule, at it is expressed in parent&#39;s coordinate system.</span>
<a name="l00127"></a>00127 <span class="comment">*   Parent may change the value using setPosX().</span>
<a name="l00128"></a>00128 <span class="comment">*</span>
<a name="l00129"></a>00129 <span class="comment">*   \section dimensions Dimensions. Bounding box.</span>
<a name="l00130"></a>00130 <span class="comment">*   One important feature of an ETSubItem is the ability to report it&#39;s bounding</span>
<a name="l00131"></a>00131 <span class="comment">*   box in local coordinates (relative to the \ref coordinates &quot;reference point&quot;</span>
<a name="l00132"></a>00132 <span class="comment">*   which is considered o have the position [0, 0]). Converting the</span>
<a name="l00133"></a>00133 <span class="comment">*   bounding box to parent&#39;s coordinate system simply means translating</span>
<a name="l00134"></a>00134 <span class="comment">*   reported boundingBox() from [0, 0] to the position that parent stores.</span>
<a name="l00135"></a>00135 <span class="comment">*</span>
<a name="l00136"></a>00136 <span class="comment">*   The bounding box that is reported via boundingBox() encompasses</span>
<a name="l00137"></a>00137 <span class="comment">*   all child sub-items and own graphical elements.</span>
<a name="l00138"></a>00138 <span class="comment">*</span>
<a name="l00139"></a>00139 <span class="comment">*   A set of functions is used to mark sub-items that need to be recomputed</span>
<a name="l00140"></a>00140 <span class="comment">*   (those that had suffered changes that modifies their bounding box</span>
<a name="l00141"></a>00141 <span class="comment">*   and the parents of those items) and recompute() will actually get the</span>
<a name="l00142"></a>00142 <span class="comment">*   size of this item and of all it&#39;s kids. Namelly, setSizeDirty() and</span>
<a name="l00143"></a>00143 <span class="comment">*   resetSizeDirty() mark or remove the mark on an item for full re-computation.</span>
<a name="l00144"></a>00144 <span class="comment">*   The item is requested that, on next call to recompute(), it should</span>
<a name="l00145"></a>00145 <span class="comment">*   determine it&#39;s bounding box from real elements (font, string) as the one</span>
<a name="l00146"></a>00146 <span class="comment">*   stored internally does not hold meaningful values anymore. All kids</span>
<a name="l00147"></a>00147 <span class="comment">*   of this sub-item must do the same. setKidSizeDirty() and resetKidSizeDirty()</span>
<a name="l00148"></a>00148 <span class="comment">*   act similarly on the flag that marks the sub-item as having kids with</span>
<a name="l00149"></a>00149 <span class="comment">*   dimensions changed. The item who&#39;s flag is set did not suffered a change,</span>
<a name="l00150"></a>00150 <span class="comment">*   so internal elements (like it&#39;s own text box) does not need to be recomputed.</span>
<a name="l00151"></a>00151 <span class="comment">*   The flags are reset by the recompute() function and may be querried</span>
<a name="l00152"></a>00152 <span class="comment">*   using isSizeDirty() and isKidSizeDirty().</span>
<a name="l00153"></a>00153 <span class="comment">*</span>
<a name="l00154"></a>00154 <span class="comment">*   \section text_characteristics Apparence (font, color)</span>
<a name="l00155"></a>00155 <span class="comment">*   Each sub-item is able to display itself using a different font and color.</span>
<a name="l00156"></a>00156 <span class="comment">*   To prevent unnecessary font changes during the paint process, a flag is used</span>
<a name="l00157"></a>00157 <span class="comment">*   to tell if font change is actually required or the font inherited by the</span>
<a name="l00158"></a>00158 <span class="comment">*   parent is good enough.</span>
<a name="l00159"></a>00159 <span class="comment">*</span>
<a name="l00160"></a>00160 <span class="comment">*   To query a sub-item that inherits from ETSubItem about it&#39;s font use</span>
<a name="l00161"></a>00161 <span class="comment">*   font() function. setFont() will save the provided font inside the item</span>
<a name="l00162"></a>00162 <span class="comment">*   and will mark the sub-item (with Flags::SIZE_DIRTY)</span>
<a name="l00163"></a>00163 <span class="comment">*   and all it&#39;s parents (with Flags::KID_SIZE_DIRTY) as &quot;dirty&quot;. However,</span>
<a name="l00164"></a>00164 <span class="comment">*   during setFont(), the parent ETI_CplxTxt and eventual parent sub-items</span>
<a name="l00165"></a>00165 <span class="comment">*   are not updated dimensionally to reflect (eventual) change in size.</span>
<a name="l00166"></a>00166 <span class="comment">*   To do so, the caller needs to explicitly call ETI_CplxTxt::recompute().</span>
<a name="l00167"></a>00167 <span class="comment">*</span>
<a name="l00168"></a>00168 <span class="comment">*   Color for the sub-item may be found using color() function. To change the</span>
<a name="l00169"></a>00169 <span class="comment">*   color use setColor(), but be aware that the parent ETI_CplxTxt item</span>
<a name="l00170"></a>00170 <span class="comment">*   is not updated. The caller needs to do that itself.</span>
<a name="l00171"></a>00171 <span class="comment">*</span>
<a name="l00172"></a>00172 <span class="comment">*   Both the color and the font may be directly used or inherited from</span>
<a name="l00173"></a>00173 <span class="comment">*   the parent. To find which situation apply, use inheritsFont() and</span>
<a name="l00174"></a>00174 <span class="comment">*   inheritsColor(), which return true if respective element is inherited.</span>
<a name="l00175"></a>00175 <span class="comment">*</span>
<a name="l00176"></a>00176 <span class="comment">*   \section painting Drawing. Visual clues.</span>
<a name="l00177"></a>00177 <span class="comment">*   When an paint event occurs in ETI_CplxTxt, the item will iterate all it&#39;s</span>
<a name="l00178"></a>00178 <span class="comment">*   sub-items and ask them to paint themselves with an paint() call.</span>
<a name="l00179"></a>00179 <span class="comment">*   At that point, the item is required to call prePaint(), then do it&#39;s</span>
<a name="l00180"></a>00180 <span class="comment">*   drawing, then call postPaint().</span>
<a name="l00181"></a>00181 <span class="comment">*</span>
<a name="l00182"></a>00182 <span class="comment">*   A crucial element in painting sub-items is PaintData structure. Inside</span>
<a name="l00183"></a>00183 <span class="comment">*   paint() function the sub-item will create a local PaintData structure</span>
<a name="l00184"></a>00184 <span class="comment">*   that is initialized with the elements it knows.</span>
<a name="l00185"></a>00185 <span class="comment">*</span>
<a name="l00186"></a>00186 <span class="comment">*   prePaint() function does initialization for the paint independent of</span>
<a name="l00187"></a>00187 <span class="comment">*   the type of sub-item. If the item uses a particular font, different</span>
<a name="l00188"></a>00188 <span class="comment">*   from what it&#39;s parent uses, it will select new font. Similar changes</span>
<a name="l00189"></a>00189 <span class="comment">*   are made for the color to be used. Visual clues regarding the background</span>
<a name="l00190"></a>00190 <span class="comment">*   of the sub-item (the bounding box) may be drawn in future implementations.</span>
<a name="l00191"></a>00191 <span class="comment">*   Inside prePaint(), bounding box is computed and saved in painter coordinates.</span>
<a name="l00192"></a>00192 <span class="comment">*</span>
<a name="l00193"></a>00193 <span class="comment">*   postPaint() draws visual clues about the sub-item on top of already painted</span>
<a name="l00194"></a>00194 <span class="comment">*   item (like position of the cursor) and restores the state of the painter</span>
<a name="l00195"></a>00195 <span class="comment">*   regarding the font and color.</span>
<a name="l00196"></a>00196 <span class="comment">*</span>
<a name="l00197"></a>00197 <span class="comment">*   The cursor is presented during the postPaint()and is represented by a</span>
<a name="l00198"></a>00198 <span class="comment">*   horizontal line that stretches on entire bottom base and a vertical line</span>
<a name="l00199"></a>00199 <span class="comment">*   placed either along the left side or along the right side.</span>
<a name="l00200"></a>00200 <span class="comment">*</span>
<a name="l00201"></a>00201 <span class="comment">*   \section def_state Item statuses</span>
<a name="l00202"></a>00202 <span class="comment">*   The class offers the ability to track the initialized / uninitialized state</span>
<a name="l00203"></a>00203 <span class="comment">*   of an item using isInitialised(). A class inheriting from ETSubItem may</span>
<a name="l00204"></a>00204 <span class="comment">*   set the state using either setInitialised() or setUninitialised(). When</span>
<a name="l00205"></a>00205 <span class="comment">*   a new instance is created it marks itself as being in default state. These</span>
<a name="l00206"></a>00206 <span class="comment">*   functions do not change any other state except the flags. This functionality</span>
<a name="l00207"></a>00207 <span class="comment">*   is intended for the class inheriting this one, not for external use.</span>
<a name="l00208"></a>00208 <span class="comment">*</span>
<a name="l00209"></a>00209 <span class="comment">*   \section navigation Navigation</span>
<a name="l00210"></a>00210 <span class="comment">*   Navigation refers to changing the current sub-item in a view using mouse</span>
<a name="l00211"></a>00211 <span class="comment">*   and the keyboard. Functions involved in this process do not trigger</span>
<a name="l00212"></a>00212 <span class="comment">*   a repaint. The caller (ETSheetView::keyPressEvent(), for example) is</span>
<a name="l00213"></a>00213 <span class="comment">*   required to update the item it send the event to and, possibly, the new</span>
<a name="l00214"></a>00214 <span class="comment">*   current item, if the action changed it.</span>
<a name="l00215"></a>00215 <span class="comment">*</span>
<a name="l00216"></a>00216 <span class="comment">*   Simple navigation using keyboard&#39;s up, down, left and right keys is</span>
<a name="l00217"></a>00217 <span class="comment">*   forwarded from the ETSheetView to current sub-item. If there is no sub-item</span>
<a name="l00218"></a>00218 <span class="comment">*   made current one present in current view is chosen. The sub-item receives</span>
<a name="l00219"></a>00219 <span class="comment">*   navigation signals with it&#39;s navKey() function, where the arguments are the</span>
<a name="l00220"></a>00220 <span class="comment">*   viewport that is sending the signal and the key. navKey() is virtual and</span>
<a name="l00221"></a>00221 <span class="comment">*   each inheriting class is required to implement it. The sub-item receiving</span>
<a name="l00222"></a>00222 <span class="comment">*   the call is guaranteed to be the current sub-item in the viewport. Based</span>
<a name="l00223"></a>00223 <span class="comment">*   on it&#39;s internal structure and current position (left or right) of the</span>
<a name="l00224"></a>00224 <span class="comment">*   cursor the item either marks one of it&#39;s kids as current, moves the</span>
<a name="l00225"></a>00225 <span class="comment">*   position of the cursor from one side to the other, or dispatches the</span>
<a name="l00226"></a>00226 <span class="comment">*   call to one of the navLeave__ functions.</span>
<a name="l00227"></a>00227 <span class="comment">*</span>
<a name="l00228"></a>00228 <span class="comment">*   ETSubItem manages the navigation at generic level using a set of four</span>
<a name="l00229"></a>00229 <span class="comment">*   functions for four directions. These are intended to be called by</span>
<a name="l00230"></a>00230 <span class="comment">*   navKey() of specific items. navLeaveLeft() and navLeaveRight()</span>
<a name="l00231"></a>00231 <span class="comment">*   selects a sibling (to the right (next) or to the left (previous) ). If there</span>
<a name="l00232"></a>00232 <span class="comment">*   is none, the parent is made current with the cursor on the side of the move.</span>
<a name="l00233"></a>00233 <span class="comment">*   If the item is at the top level, the viewport is requested to select another</span>
<a name="l00234"></a>00234 <span class="comment">*   ETI_CplxTxt item.</span>
<a name="l00235"></a>00235 <span class="comment">*</span>
<a name="l00236"></a>00236 <span class="comment">*   navLeaveBtm() and navLeaveTop() work in a sensible different way. Top</span>
<a name="l00237"></a>00237 <span class="comment">*   level sub-items recieving the event will also request the viewport to</span>
<a name="l00238"></a>00238 <span class="comment">*   select other ETI_CplxTxt items, but any other sub-item that has a parent</span>
<a name="l00239"></a>00239 <span class="comment">*   will request it&#39;s parent to select another sub-item using kidNavReq_down()</span>
<a name="l00240"></a>00240 <span class="comment">*   or kidNavReq_up(). Only if the parent finds no kid to select (because</span>
<a name="l00241"></a>00241 <span class="comment">*   it&#39;s a simple one or current sub-item is near the edge) the parent itself</span>
<a name="l00242"></a>00242 <span class="comment">*   is selected.</span>
<a name="l00243"></a>00243 <span class="comment">*</span>
<a name="l00244"></a>00244 <span class="comment">*   Here is the logic tree using function names:</span>
<a name="l00245"></a>00245 <span class="comment">*   - ETSheetView::keyPressEvent()</span>
<a name="l00246"></a>00246 <span class="comment">*           - navKey()</span>
<a name="l00247"></a>00247 <span class="comment">*                   - navLeaveTop()</span>
<a name="l00248"></a>00248 <span class="comment">*                           - ETSheetView::navLeaveTop()</span>
<a name="l00249"></a>00249 <span class="comment">*                   - navLeaveBtm()</span>
<a name="l00250"></a>00250 <span class="comment">*                           - ETSheetView::navLeaveBtm()</span>
<a name="l00251"></a>00251 <span class="comment">*                   - navLeaveLeft()</span>
<a name="l00252"></a>00252 <span class="comment">*                           - ETSheetView::navLeaveLeft()</span>
<a name="l00253"></a>00253 <span class="comment">*                   - navLeaveRight()</span>
<a name="l00254"></a>00254 <span class="comment">*                           - ETSheetView::navLeaveRight()</span>
<a name="l00255"></a>00255 <span class="comment">*</span>
<a name="l00256"></a>00256 <span class="comment">*                           - ETSheetView::setCurrentSubI()</span>
<a name="l00257"></a>00257 <span class="comment">*</span>
<a name="l00258"></a>00258 <span class="comment">*                   - ETSheetView::setSelLeft()</span>
<a name="l00259"></a>00259 <span class="comment">*                   - ETSheetView::setSelRight()</span>
<a name="l00260"></a>00260 <span class="comment">*</span>
<a name="l00261"></a>00261 <span class="comment">*</span>
<a name="l00262"></a>00262 <span class="comment">*   \section save_load      Saving and loading from xml file</span>
<a name="l00263"></a>00263 <span class="comment">*   All classes that inherit from ETSubItem are required to implement</span>
<a name="l00264"></a>00264 <span class="comment">*   saveXML() that is used by the parent (a ETI_CplxTxt or another ETSubItem)</span>
<a name="l00265"></a>00265 <span class="comment">*   to save that particular instance. The implementation of saveXML() must make</span>
<a name="l00266"></a>00266 <span class="comment">*   use of saveXMLCmn() to save common properties for all sub-items that are</span>
<a name="l00267"></a>00267 <span class="comment">*   managed by this class.</span>
<a name="l00268"></a>00268 <span class="comment">*</span>
<a name="l00269"></a>00269 <span class="comment">*   Loading an sub-item starts with loadXMLByType(). It looks inside the DOM</span>
<a name="l00270"></a>00270 <span class="comment">*   element it is provided with for a type and, when found, asks the proper</span>
<a name="l00271"></a>00271 <span class="comment">*   class to create an instance based on the properties that are stored</span>
<a name="l00272"></a>00272 <span class="comment">*   in the node. For this purpose, all inheritant classes must be equipped with</span>
<a name="l00273"></a>00273 <span class="comment">*   a static member named \b loadXML. Similarly to saveXMLCmn(), inheritants are</span>
<a name="l00274"></a>00274 <span class="comment">*   requested to call loadXMLCmn() from within their \b loadXML.</span>
<a name="l00275"></a>00275 <span class="comment">*</span>
<a name="l00276"></a>00276 <span class="comment">*   The format of the file that is saved follows the guidance in</span>
<a name="l00277"></a>00277 <span class="comment">*   &lt;a href=&quot;https://code.google.com/p/equtemper/source/browse/trunk/doc/example.xml&quot;&gt;</span>
<a name="l00278"></a>00278 <span class="comment">*   example.xml&lt;/a&gt; that is located in</span>
<a name="l00279"></a>00279 <span class="comment">*   &lt;a href=&quot;https://code.google.com/p/equtemper/source/browse/trunk/doc&quot;&gt;doc&lt;/a&gt;</span>
<a name="l00280"></a>00280 <span class="comment">*   subfolder.</span>
<a name="l00281"></a>00281 <span class="comment">*</span>
<a name="l00282"></a>00282 <span class="comment">*/</span>
<a name="l00283"></a><a class="code" href="class_e_t_sub_item.html">00283</a> <span class="keyword">class </span><a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a> : <span class="keyword">public</span> <a class="code" href="class_c_c___l2_d.html" title="class representing the list element in a linked list system">CC_L2D</a>     {
<a name="l00284"></a>00284 
<a name="l00285"></a>00285     <span class="comment">//</span>
<a name="l00286"></a>00286     <span class="comment">//</span>
<a name="l00287"></a>00287     <span class="comment">//</span>
<a name="l00288"></a>00288     <span class="comment">//</span>
<a name="l00289"></a>00289     <span class="comment">/*  DEFINITIONS    ----------------------------------------------------- */</span>
<a name="l00290"></a>00290 
<a name="l00291"></a><a class="code" href="class_e_t_sub_item.html#a7ca80bae059032e9983441f20f6d6c7a">00291</a>     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_e_t_i___cplx_txt.html" title="class representing a complex text; this may or may not represent an equation">ETI_CplxTxt</a>;
<a name="l00292"></a><a class="code" href="class_e_t_sub_item.html#a34d0a2f059a3dad68a04550281094bba">00292</a>     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_e_t_sheet_view.html" title="Widget capable of displaying an ETSheet content.">ETSheetView</a>;
<a name="l00293"></a>00293 
<a name="l00294"></a><a class="code" href="class_e_t_sub_item.html#adf429c14f3cf5448159f73b5cd08812f">00294</a>     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_e_t_s_i___fract.html" title="sub-item displaying a fraction; consists of two ETSI_Root sub-items">ETSI_Fract</a>;
<a name="l00295"></a><a class="code" href="class_e_t_sub_item.html#a5c2b86b5b9ddd4b26bbfa04bf7d1ad50">00295</a>     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_e_t_s_i___h_text.html" title="presents a central text and has six other ETSI_Root arround it">ETSI_HText</a>;
<a name="l00296"></a><a class="code" href="class_e_t_sub_item.html#a939fe87c9a3a9e79b6e7b04ea81aca5d">00296</a>     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_e_t_s_i___integ.html" title="sub-item presenting an integral; consists of four ETSI_Root sub-items">ETSI_Integ</a>;
<a name="l00297"></a><a class="code" href="class_e_t_sub_item.html#aed2088816caad843f30d18a911275caf">00297</a>     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_e_t_s_i___lim.html" title="sub-item presenting a limit">ETSI_Lim</a>;
<a name="l00298"></a><a class="code" href="class_e_t_sub_item.html#a71f479ff951353fcd490197e0d4de7ef">00298</a>     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_e_t_s_i___logic_ac.html" title="sub-item able to display a logical if-elseif-else component">ETSI_LogicAc</a>;
<a name="l00299"></a><a class="code" href="class_e_t_sub_item.html#a73ae4760dceafce2ba5f1a67f851e479">00299</a>     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_e_t_s_i___matrix.html" title="sub-item presenting a matrix or a determinant">ETSI_Matrix</a>;
<a name="l00300"></a><a class="code" href="class_e_t_sub_item.html#a56ddd7c05e3754e3ea4724c28aec0f41">00300</a>     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_e_t_s_i___radic.html" title="sub-item that will display a radical">ETSI_Radic</a>;
<a name="l00301"></a><a class="code" href="class_e_t_sub_item.html#a37655f0e690aab05ca91b0dbfd6ae8cc">00301</a>     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_e_t_s_i___s_text.html" title="simple sub-item capable to display a string">ETSI_SText</a>;
<a name="l00302"></a><a class="code" href="class_e_t_sub_item.html#abcdacec2c9904c327f53c01e3bde1256">00302</a>     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_e_t_s_i___sum.html" title="sub-item that will display a sum; consists of three ETSI_Root sub-items">ETSI_Sum</a>;
<a name="l00303"></a><a class="code" href="class_e_t_sub_item.html#ae5febfca14d4c7ee59ddfe74a73a538d">00303</a>     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_e_t_s_i___root.html" title="sub-item able to host a row of horizontal sub-items">ETSI_Root</a>;
<a name="l00304"></a><a class="code" href="class_e_t_sub_item.html#a43710d53364810a9efcc27d6cd7c6fe2">00304</a>     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_e_t_s_i___rows.html" title="sub-item able to display any number of rows, each of wich with multiple sub-items">ETSI_Rows</a>;
<a name="l00305"></a>00305 
<a name="l00306"></a>00306 
<a name="l00307"></a>00307 
<a name="l00308"></a><a class="code" href="_e_t_sub_item_8h.html#a474aa227bb96d124fa9aaa962e6e4c04">00308</a> <span class="preprocessor">#define DDHC_SUBITEM_VARS   \</span>
<a name="l00309"></a>00309 <span class="preprocessor">    DDHC_VARIABLE(itm_font) \</span>
<a name="l00310"></a>00310 <span class="preprocessor">    DDHC_VARIABLE(itm_col)  \</span>
<a name="l00311"></a>00311 <span class="preprocessor">    DDHC_VARIABLE(itm_pen)  \</span>
<a name="l00312"></a>00312 <span class="preprocessor">    DDHC_VARIABLE(bbox)     \</span>
<a name="l00313"></a>00313 <span class="preprocessor">    DDHC_VARIABLE(flg)      \</span>
<a name="l00314"></a>00314 <span class="preprocessor">    DDHC_VARIABLE(fth.fth_cplx)     \</span>
<a name="l00315"></a>00315 <span class="preprocessor">    DDHC_VARIABLE(fth.fth_sub_i)    \</span>
<a name="l00316"></a>00316 <span class="preprocessor">    DDHC_VARIABLE(x_pos)</span>
<a name="l00317"></a>00317 <span class="preprocessor"></span>
<a name="l00318"></a>00318 
<a name="l00319"></a>00319 
<a name="l00320"></a>00320 <span class="comment"></span>
<a name="l00321"></a>00321 <span class="comment">    /// structure used with paint opperations to pass arguments arround</span>
<a name="l00322"></a><a class="code" href="struct_e_t_sub_item_1_1_paint_data.html">00322</a> <span class="comment"></span>    <span class="keyword">struct  </span><a class="code" href="struct_e_t_sub_item_1_1_paint_data.html" title="structure used with paint opperations to pass arguments arround">PaintData</a>       {
<a name="l00323"></a>00323         <span class="comment">/* input from caller, valid as long as the structure lives */</span>
<a name="l00324"></a><a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#a14035ccfd0985a0c5c4d938131922962">00324</a>         <a class="code" href="class_e_t_sheet_view.html" title="Widget capable of displaying an ETSheet content.">ETSheetView</a> *       <a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#a14035ccfd0985a0c5c4d938131922962">vp</a>;         <span class="comment">/**&lt; the viewport where we&#39;re drawing*/</span>
<a name="l00325"></a><a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#adaf615abcea44238ca9d45203ad89ff3">00325</a>         QPainter *          <a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#adaf615abcea44238ca9d45203ad89ff3">painter</a>;    <span class="comment">/**&lt; painter object*/</span>
<a name="l00326"></a><a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#a2e6c37ba0c975c968b515821d743d469">00326</a>         QPointF             <a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#a2e6c37ba0c975c968b515821d743d469">pt_ref</a>;     <span class="comment">/**&lt; the position of the reference</span>
<a name="l00327"></a>00327 <span class="comment">point in painter&#39;s (actually in scene) coordinate system */</span>
<a name="l00328"></a>00328 
<a name="l00329"></a>00329         <span class="comment">/* only valid after the call to prePaint */</span>
<a name="l00330"></a><a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#a0f6c3f8f1c64987ddab21eec810cbbc5">00330</a>         QRectF              <a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#a0f6c3f8f1c64987ddab21eec810cbbc5">t_box</a>;      <span class="comment">/**&lt; bounding box for the item in</span>
<a name="l00331"></a>00331 <span class="comment">painter&#39;s (actually in scene) coordinate system */</span>
<a name="l00332"></a>00332 
<a name="l00333"></a><a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#a018d39b9ab2dc0984bf330ca33249b62">00333</a>         <a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#a018d39b9ab2dc0984bf330ca33249b62">PaintData</a>(<a class="code" href="class_e_t_sheet_view.html" title="Widget capable of displaying an ETSheet content.">ETSheetView</a> * i_vp, QPainter * i_painter, QPointF i_pt_ref)
<a name="l00334"></a>00334         { <a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#a14035ccfd0985a0c5c4d938131922962">vp</a> = i_vp; <a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#adaf615abcea44238ca9d45203ad89ff3">painter</a> = i_painter; <a class="code" href="struct_e_t_sub_item_1_1_paint_data.html#a2e6c37ba0c975c968b515821d743d469">pt_ref</a> = i_pt_ref; }
<a name="l00335"></a>00335     };
<a name="l00336"></a>00336 
<a name="l00337"></a>00337 
<a name="l00338"></a>00338 <span class="comment"></span>
<a name="l00339"></a>00339 <span class="comment">    /// structure used with the hit test function to pass informations arround</span>
<a name="l00340"></a><a class="code" href="struct_e_t_sub_item_1_1_ht_data.html">00340</a> <span class="comment"></span>    <span class="keyword">struct      </span><a class="code" href="struct_e_t_sub_item_1_1_ht_data.html" title="structure used with the hit test function to pass informations arround">HtData</a>      {
<a name="l00341"></a>00341 
<a name="l00342"></a><a class="code" href="struct_e_t_sub_item_1_1_ht_data.html#a76f2784590b948caeb617c3a0de404ce">00342</a>         QPointF     <a class="code" href="struct_e_t_sub_item_1_1_ht_data.html#a76f2784590b948caeb617c3a0de404ce">ck_pt</a>;      <span class="comment">/**&lt; point that is searched in ETI_CplxTxt</span>
<a name="l00343"></a>00343 <span class="comment">item coordinates; this must be filled by the caller */</span>
<a name="l00344"></a>00344 
<a name="l00345"></a><a class="code" href="struct_e_t_sub_item_1_1_ht_data.html#a330abd29a1d408764aa6d5fac7aec598">00345</a>         <a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a> * <a class="code" href="struct_e_t_sub_item_1_1_ht_data.html#a330abd29a1d408764aa6d5fac7aec598">it_hitted</a>;  <span class="comment">/**&lt; the final item that was hit */</span>
<a name="l00346"></a>00346 
<a name="l00347"></a><a class="code" href="struct_e_t_sub_item_1_1_ht_data.html#a483e8524c10113b4637410e43ff95b79">00347</a>         <span class="keywordtype">bool</span>        <a class="code" href="struct_e_t_sub_item_1_1_ht_data.html#a483e8524c10113b4637410e43ff95b79">true_hit</a>;   <span class="comment">/**&lt; set to true if the \b it_hitted was</span>
<a name="l00348"></a>00348 <span class="comment">hit inside an active area (like over the text) or to false if the point</span>
<a name="l00349"></a>00349 <span class="comment">is inside the bounding box of this item but over an unused area */</span>
<a name="l00350"></a>00350 
<a name="l00351"></a><a class="code" href="struct_e_t_sub_item_1_1_ht_data.html#a26c35c7b10f180d0545c0da0a95c625b">00351</a>         QPointF     <a class="code" href="struct_e_t_sub_item_1_1_ht_data.html#a26c35c7b10f180d0545c0da0a95c625b">ref_pt</a>;     <span class="comment">/**&lt; the coordinates of the reference point</span>
<a name="l00352"></a>00352 <span class="comment">for the item that was hit in ETI_CplxTxt item coordinates */</span>
<a name="l00353"></a>00353 
<a name="l00354"></a><a class="code" href="struct_e_t_sub_item_1_1_ht_data.html#a25d07d87b54fde164a9ceab1fc23498a">00354</a>         QRectF      <a class="code" href="struct_e_t_sub_item_1_1_ht_data.html#a25d07d87b54fde164a9ceab1fc23498a">rct_bbx</a>;    <span class="comment">/**&lt; the bounding box of this item in</span>
<a name="l00355"></a>00355 <span class="comment">ETI_CplxTxt item coordinates */</span>
<a name="l00356"></a><a class="code" href="struct_e_t_sub_item_1_1_ht_data.html#ab2cccda1b2dab2cb85c00a5e6ee94f00">00356</a>         QRectF      <a class="code" href="struct_e_t_sub_item_1_1_ht_data.html#ab2cccda1b2dab2cb85c00a5e6ee94f00">rct_cache</a>;  <span class="comment">/**&lt; used to avoid storing the data on the stack;</span>
<a name="l00357"></a>00357 <span class="comment">It is used by the iterative process to store converted coordinates; it is</span>
<a name="l00358"></a>00358 <span class="comment">meaningless to the caller */</span>
<a name="l00359"></a>00359 
<a name="l00360"></a><a class="code" href="struct_e_t_sub_item_1_1_ht_data.html#a46931c35b0bce42956b0c8adf25939d1">00360</a>         quint64     <a class="code" href="struct_e_t_sub_item_1_1_ht_data.html#a46931c35b0bce42956b0c8adf25939d1">int_data</a>;   <span class="comment">/**&lt; each sub-item may save whatever data</span>
<a name="l00361"></a>00361 <span class="comment">it wishes in this field*/</span>
<a name="l00362"></a>00362 
<a name="l00363"></a><a class="code" href="struct_e_t_sub_item_1_1_ht_data.html#a1c98d20cb173f677bee25cee6365343e">00363</a>         <a class="code" href="struct_e_t_sub_item_1_1_ht_data.html#a1c98d20cb173f677bee25cee6365343e">HtData</a>(QPointF pt_to_ck)
<a name="l00364"></a>00364         {
<a name="l00365"></a>00365             <a class="code" href="struct_e_t_sub_item_1_1_ht_data.html#a76f2784590b948caeb617c3a0de404ce">ck_pt</a> = pt_to_ck;
<a name="l00366"></a>00366             <a class="code" href="struct_e_t_sub_item_1_1_ht_data.html#a330abd29a1d408764aa6d5fac7aec598">it_hitted</a> = <a class="code" href="aclass__ddhc_8cc.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>;
<a name="l00367"></a>00367             <a class="code" href="struct_e_t_sub_item_1_1_ht_data.html#a483e8524c10113b4637410e43ff95b79">true_hit</a> = <span class="keyword">false</span>;
<a name="l00368"></a>00368             <a class="code" href="struct_e_t_sub_item_1_1_ht_data.html#a25d07d87b54fde164a9ceab1fc23498a">rct_bbx</a>.setCoords(0,0,0,0);
<a name="l00369"></a>00369             <a class="code" href="struct_e_t_sub_item_1_1_ht_data.html#a26c35c7b10f180d0545c0da0a95c625b">ref_pt</a>.setX(0); <a class="code" href="struct_e_t_sub_item_1_1_ht_data.html#a26c35c7b10f180d0545c0da0a95c625b">ref_pt</a>.setY(0);
<a name="l00370"></a>00370             <a class="code" href="struct_e_t_sub_item_1_1_ht_data.html#a46931c35b0bce42956b0c8adf25939d1">int_data</a> = 0;
<a name="l00371"></a>00371         }
<a name="l00372"></a>00372     };
<a name="l00373"></a>00373 
<a name="l00374"></a>00374 
<a name="l00375"></a>00375 
<a name="l00376"></a>00376 <span class="comment"></span>
<a name="l00377"></a>00377 <span class="comment">    /// one bit switches</span>
<a name="l00378"></a><a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055">00378</a> <span class="comment"></span>    <span class="keyword">enum</span> <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055" title="one bit switches">Flags</a>      {
<a name="l00379"></a><a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a63518eaf6c9bbeb20f6149a576d3cb8e">00379</a>         <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a63518eaf6c9bbeb20f6149a576d3cb8e">NOFLAGS</a> = 0,
<a name="l00380"></a>00380 
<a name="l00381"></a><a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055adf078dcde0bd69a7a700a6751056dee6">00381</a>         <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055adf078dcde0bd69a7a700a6751056dee6">SIZE_DIRTY</a> = 0x00000001,        <span class="comment">/**&lt; set when an item&#39;s characteristics</span>
<a name="l00382"></a>00382 <span class="comment">that participate in determining the dimensions (bounding box) have chganged.</span>
<a name="l00383"></a>00383 <span class="comment">It is set by setFont(), for example. */</span>
<a name="l00384"></a><a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a655f796a2c5b4b0dc00d95390ca6ca17">00384</a>         <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a655f796a2c5b4b0dc00d95390ca6ca17">KID_SIZE_DIRTY</a> = 0x00000002,    <span class="comment">/**&lt; set in all parents (up to the top</span>
<a name="l00385"></a>00385 <span class="comment">one) of an item who&#39;s SIZE_DIRTY flag has been set. */</span>
<a name="l00386"></a>00386 
<a name="l00387"></a>00387 
<a name="l00388"></a><a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a3ff699dba1c7431469e07f63e23b15d7">00388</a>         <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a3ff699dba1c7431469e07f63e23b15d7">CHILD_ITEM</a> = 0x00000004,        <span class="comment">/**&lt; this item is not placed at the</span>
<a name="l00389"></a>00389 <span class="comment">top level (fth_sub_i is valid) */</span>
<a name="l00390"></a>00390 
<a name="l00391"></a>00391 
<a name="l00392"></a><a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a01ebc2d8cfadac52c4633ff69c2f6b31">00392</a>         <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a01ebc2d8cfadac52c4633ff69c2f6b31">FONT_MOD</a> = 0x00000008,          <span class="comment">/**&lt; the font stored inside this item</span>
<a name="l00393"></a>00393 <span class="comment">is different than the one it&#39;s parent has, thus it is crucial to change</span>
<a name="l00394"></a>00394 <span class="comment">the font used when this item&#39;s being painted */</span>
<a name="l00395"></a><a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055adf362be8b7054ea6af97d43b7eb694ef">00395</a>         <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055adf362be8b7054ea6af97d43b7eb694ef">COL_MOD</a> = 0x00000010,           <span class="comment">/**&lt; the color stored inside this item</span>
<a name="l00396"></a>00396 <span class="comment">is different than the one it&#39;s parent has, thus it is crucial to change</span>
<a name="l00397"></a>00397 <span class="comment">the color used when this item&#39;s being painted */</span>
<a name="l00398"></a><a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a3d93efa3d56a84ecbd6a997dcacd22f5">00398</a>         <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a3d93efa3d56a84ecbd6a997dcacd22f5">PEN_MOD</a> = 0x00000020,           <span class="comment">/**&lt; the pen stored inside this item</span>
<a name="l00399"></a>00399 <span class="comment">is different than the one it&#39;s parent has, thus it is crucial to change</span>
<a name="l00400"></a>00400 <span class="comment">the pen used when this item&#39;s being painted */</span>
<a name="l00401"></a>00401 
<a name="l00402"></a>00402 
<a name="l00403"></a><a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a617508f4c9d8068e0e2017e2862ff482">00403</a>         <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a617508f4c9d8068e0e2017e2862ff482">DEFAULT_STATE</a> = 0x00000040,     <span class="comment">/**&lt; this sub-item is in uninitialised</span>
<a name="l00404"></a>00404 <span class="comment">state. It may present text for the user, for example, but it does not have</span>
<a name="l00405"></a>00405 <span class="comment">a real value. Classes that inherit from ETSubItem are not required to</span>
<a name="l00406"></a>00406 <span class="comment">assign a meaning to this flag.*/</span>
<a name="l00407"></a>00407 
<a name="l00408"></a>00408 
<a name="l00409"></a><a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055ad808a4cbe31e2afd93afc9ecef98bb47">00409</a>         <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055ad808a4cbe31e2afd93afc9ecef98bb47">SELECTED</a> = 0x00000080,          <span class="comment">/**&lt; the item is visually selected. This</span>
<a name="l00410"></a>00410 <span class="comment">is not the same thing as being current item in a viewport.*/</span>
<a name="l00411"></a>00411 
<a name="l00412"></a>00412 
<a name="l00413"></a>00413 
<a name="l00414"></a><a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055ad44a5752c129cc33c5fd3ab45bb32a6e">00414</a>         <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055ad44a5752c129cc33c5fd3ab45bb32a6e">SBI_FLAGS</a> = 0x0000FFFF,         <span class="comment">/**&lt; mask for the flags reserved for</span>
<a name="l00415"></a>00415 <span class="comment">  ETSubItem. The rest of the places may be freely used by classes inheriting</span>
<a name="l00416"></a>00416 <span class="comment">  ETSubItem class.*/</span>
<a name="l00417"></a>00417 
<a name="l00418"></a><a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055af64937001c26a3ac94ac86729aa2aeae">00418</a>         <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055af64937001c26a3ac94ac86729aa2aeae">INH_FLAGS</a> = 0xFFFF0000,         <span class="comment">/**&lt; mask for the flags reserved for</span>
<a name="l00419"></a>00419 <span class="comment">  classes inheriting ETSubItem class.*/</span>
<a name="l00420"></a>00420 
<a name="l00421"></a>00421 
<a name="l00422"></a><a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a723b7e1b2ccde1cc95ff7a23f9980abb">00422</a>         <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a723b7e1b2ccde1cc95ff7a23f9980abb">MAX_FLAGS</a>
<a name="l00423"></a>00423     };
<a name="l00424"></a>00424 
<a name="l00425"></a>00425 
<a name="l00426"></a>00426 <span class="keyword">public</span>:
<a name="l00427"></a>00427 <span class="comment"></span>
<a name="l00428"></a>00428 <span class="comment">    /// enumeration that tells the types of sub-items we know about</span>
<a name="l00429"></a><a class="code" href="class_e_t_sub_item.html#aa7307b06fe620851acea92b9b6e93ea6">00429</a> <span class="comment"></span>    <span class="keyword">enum</span>        <a class="code" href="class_e_t_sub_item.html#aa7307b06fe620851acea92b9b6e93ea6" title="enumeration that tells the types of sub-items we know about">SIType</a>      {
<a name="l00430"></a><a class="code" href="class_e_t_sub_item.html#aa7307b06fe620851acea92b9b6e93ea6a1503c9e60f277432cdd4c57c86c96ae6">00430</a>         <a class="code" href="class_e_t_sub_item.html#aa7307b06fe620851acea92b9b6e93ea6a1503c9e60f277432cdd4c57c86c96ae6">TYROOT</a> = 0,
<a name="l00431"></a><a class="code" href="class_e_t_sub_item.html#aa7307b06fe620851acea92b9b6e93ea6aa222df0f0b84ae5d80b7e59fb5c580c1">00431</a>         <a class="code" href="class_e_t_sub_item.html#aa7307b06fe620851acea92b9b6e93ea6aa222df0f0b84ae5d80b7e59fb5c580c1">TYROWS</a>,
<a name="l00432"></a><a class="code" href="class_e_t_sub_item.html#aa7307b06fe620851acea92b9b6e93ea6a93042d919022ac6527bfbf4d263d1273">00432</a>         <a class="code" href="class_e_t_sub_item.html#aa7307b06fe620851acea92b9b6e93ea6a93042d919022ac6527bfbf4d263d1273">TYFRACT</a>,
<a name="l00433"></a><a class="code" href="class_e_t_sub_item.html#aa7307b06fe620851acea92b9b6e93ea6ad12876c0fae3e2a509726ae70ffcfdbf">00433</a>         <a class="code" href="class_e_t_sub_item.html#aa7307b06fe620851acea92b9b6e93ea6ad12876c0fae3e2a509726ae70ffcfdbf">TYHTEXT</a>,
<a name="l00434"></a><a class="code" href="class_e_t_sub_item.html#aa7307b06fe620851acea92b9b6e93ea6afcc31ddc7e403b0e136be6c36cc71336">00434</a>         <a class="code" href="class_e_t_sub_item.html#aa7307b06fe620851acea92b9b6e93ea6afcc31ddc7e403b0e136be6c36cc71336">TYINTEG</a>,
<a name="l00435"></a><a class="code" href="class_e_t_sub_item.html#aa7307b06fe620851acea92b9b6e93ea6af22bfacde3764b8ab7b3f0701359d350">00435</a>         <a class="code" href="class_e_t_sub_item.html#aa7307b06fe620851acea92b9b6e93ea6af22bfacde3764b8ab7b3f0701359d350">TYLIM</a>,
<a name="l00436"></a><a class="code" href="class_e_t_sub_item.html#aa7307b06fe620851acea92b9b6e93ea6a7385e03b5b22695307b6e9d3f765ce3e">00436</a>         <a class="code" href="class_e_t_sub_item.html#aa7307b06fe620851acea92b9b6e93ea6a7385e03b5b22695307b6e9d3f765ce3e">TYLOGICAC</a>,
<a name="l00437"></a><a class="code" href="class_e_t_sub_item.html#aa7307b06fe620851acea92b9b6e93ea6a0bfa12df1cae66bd0f9c535fe02df4c4">00437</a>         <a class="code" href="class_e_t_sub_item.html#aa7307b06fe620851acea92b9b6e93ea6a0bfa12df1cae66bd0f9c535fe02df4c4">TYMATRIX</a>,
<a name="l00438"></a><a class="code" href="class_e_t_sub_item.html#aa7307b06fe620851acea92b9b6e93ea6a51f9d942fcccacf96d63da17c6d50191">00438</a>         <a class="code" href="class_e_t_sub_item.html#aa7307b06fe620851acea92b9b6e93ea6a51f9d942fcccacf96d63da17c6d50191">TYRADIC</a>,
<a name="l00439"></a><a class="code" href="class_e_t_sub_item.html#aa7307b06fe620851acea92b9b6e93ea6ab47ada72a5ab0073c8b32562eb3185d4">00439</a>         <a class="code" href="class_e_t_sub_item.html#aa7307b06fe620851acea92b9b6e93ea6ab47ada72a5ab0073c8b32562eb3185d4">TYSTEXT</a>,
<a name="l00440"></a><a class="code" href="class_e_t_sub_item.html#aa7307b06fe620851acea92b9b6e93ea6a9c31cf8e2898ec1a24280183a020fb06">00440</a>         <a class="code" href="class_e_t_sub_item.html#aa7307b06fe620851acea92b9b6e93ea6a9c31cf8e2898ec1a24280183a020fb06">TYSUM</a>,
<a name="l00441"></a><a class="code" href="class_e_t_sub_item.html#aa7307b06fe620851acea92b9b6e93ea6a5c51589793df7afac686372957d01008">00441</a>         <a class="code" href="class_e_t_sub_item.html#aa7307b06fe620851acea92b9b6e93ea6a5c51589793df7afac686372957d01008">TYMAX</a>
<a name="l00442"></a>00442     };
<a name="l00443"></a>00443 
<a name="l00444"></a>00444     <span class="comment">/*  DEFINITIONS    ===================================================== */</span>
<a name="l00445"></a>00445     <span class="comment">//</span>
<a name="l00446"></a>00446     <span class="comment">//</span>
<a name="l00447"></a>00447     <span class="comment">//</span>
<a name="l00448"></a>00448     <span class="comment">//</span>
<a name="l00449"></a>00449     <span class="comment">/*  DATA    ------------------------------------------------------------ */</span>
<a name="l00450"></a>00450 
<a name="l00451"></a>00451 <span class="keyword">protected</span>:
<a name="l00452"></a>00452 
<a name="l00453"></a>00453 
<a name="l00454"></a>00454 <span class="comment"></span>
<a name="l00455"></a>00455 <span class="comment">    /// the default font that is used to paint this item</span>
<a name="l00456"></a><a class="code" href="class_e_t_sub_item.html#a9c7318d8f6eaca5ffc2f9c04a2e2b3b3">00456</a> <span class="comment"></span>    QFont       <a class="code" href="class_e_t_sub_item.html#a9c7318d8f6eaca5ffc2f9c04a2e2b3b3" title="the default font that is used to paint this item">itm_font</a>;
<a name="l00457"></a>00457 <span class="comment"></span>
<a name="l00458"></a>00458 <span class="comment">    /// color used to paint this item</span>
<a name="l00459"></a><a class="code" href="class_e_t_sub_item.html#abbe3ddeaaaeb14e18837d7cfd4180fe3">00459</a> <span class="comment"></span>    QColor      <a class="code" href="class_e_t_sub_item.html#abbe3ddeaaaeb14e18837d7cfd4180fe3" title="color used to paint this item">itm_col</a>;
<a name="l00460"></a>00460 <span class="comment"></span>
<a name="l00461"></a>00461 <span class="comment">    /// the rgb used to paint text, draw lines, ...</span>
<a name="l00462"></a><a class="code" href="class_e_t_sub_item.html#abf16c501488190ec6a55b402978723c1">00462</a> <span class="comment"></span>    QRgb        <a class="code" href="class_e_t_sub_item.html#abf16c501488190ec6a55b402978723c1" title="the rgb used to paint text, draw lines, ...">itm_pen</a>;
<a name="l00463"></a>00463 <span class="comment"></span>
<a name="l00464"></a>00464 <span class="comment">    /// the boundingg box in local coordinates</span>
<a name="l00465"></a><a class="code" href="class_e_t_sub_item.html#a8a82d3aad7a84597b451240dc75a0cb4">00465</a> <span class="comment"></span>    QRectF      <a class="code" href="class_e_t_sub_item.html#a8a82d3aad7a84597b451240dc75a0cb4" title="the boundingg box in local coordinates">bbox</a>;
<a name="l00466"></a>00466 <span class="comment"></span>
<a name="l00467"></a>00467 <span class="comment">    /// various 1 bit switches</span>
<a name="l00468"></a><a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812">00468</a> <span class="comment"></span>    <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055" title="one bit switches">Flags</a>       <a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a>;
<a name="l00469"></a>00469 <span class="comment"></span>
<a name="l00470"></a>00470 <span class="comment">    /// pointer to parent sub-item or ETI_CplxTxt if at top level</span>
<a name="l00471"></a>00471 <span class="comment"></span>    <span class="keyword">union   </span>{<span class="comment"></span>
<a name="l00472"></a>00472 <span class="comment">        /// the hosting item, used if this ETSubItem is at top level</span>
<a name="l00473"></a><a class="code" href="class_e_t_sub_item.html#a4c061776d7be6a4be93d29a72b7d7789">00473</a> <span class="comment"></span>        <a class="code" href="class_e_t_i___cplx_txt.html" title="class representing a complex text; this may or may not represent an equation">ETI_CplxTxt</a> *   <a class="code" href="class_e_t_sub_item.html#a4c061776d7be6a4be93d29a72b7d7789" title="the hosting item, used if this ETSubItem is at top level">fth_cplx</a>;<span class="comment"></span>
<a name="l00474"></a>00474 <span class="comment">        /// parent sub-item</span>
<a name="l00475"></a><a class="code" href="class_e_t_sub_item.html#a52b851e88b4bd512c50142d3be784feb">00475</a> <span class="comment"></span>        <a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a> *     <a class="code" href="class_e_t_sub_item.html#a52b851e88b4bd512c50142d3be784feb" title="parent sub-item">fth_sub_i</a>;
<a name="l00476"></a>00476     } <a class="code" href="class_e_t_sub_item.html#a45307ad1bf08b9516e293d69e60cf030">fth</a>;
<a name="l00477"></a>00477 <span class="comment"></span>
<a name="l00478"></a>00478 <span class="comment">    /// position (in parent coordinate system)</span>
<a name="l00479"></a><a class="code" href="class_e_t_sub_item.html#a3bf65adb5d5c0286f21791eb1d279c8f">00479</a> <span class="comment"></span>    qreal       <a class="code" href="class_e_t_sub_item.html#a3bf65adb5d5c0286f21791eb1d279c8f" title="position (in parent coordinate system)">x_pos</a>;
<a name="l00480"></a>00480 
<a name="l00481"></a>00481 
<a name="l00482"></a>00482 
<a name="l00483"></a>00483     <span class="comment">/*  DATA    ============================================================ */</span>
<a name="l00484"></a>00484     <span class="comment">//</span>
<a name="l00485"></a>00485     <span class="comment">//</span>
<a name="l00486"></a>00486     <span class="comment">//</span>
<a name="l00487"></a>00487     <span class="comment">//</span>
<a name="l00488"></a>00488     <span class="comment">/*  FUNCTIONS    ------------------------------------------------------- */</span>
<a name="l00489"></a>00489 
<a name="l00490"></a>00490 <span class="keyword">public</span>:
<a name="l00491"></a>00491 <span class="comment"></span>
<a name="l00492"></a>00492 <span class="comment">    /// constructor</span>
<a name="l00493"></a>00493 <span class="comment"></span><span class="comment">    /**</span>
<a name="l00494"></a>00494 <span class="comment">   *    The constructor of an sub-item simply brings the internal data in a known</span>
<a name="l00495"></a>00495 <span class="comment">   *    state. All further initialization is performed by the caller, depending</span>
<a name="l00496"></a>00496 <span class="comment">   *    on particular case.  This extends to items inheriting from ETSubItem.</span>
<a name="l00497"></a>00497 <span class="comment">   */</span>
<a name="l00498"></a>00498     <a class="code" href="class_e_t_sub_item.html#a3ef1bf5a6bda438050ce43d15a69bd08" title="constructor">ETSubItem</a>           ( <span class="keywordtype">void</span> );
<a name="l00499"></a>00499 
<a name="l00500"></a>00500 <span class="comment"></span>
<a name="l00501"></a>00501 <span class="comment">    /// destructor</span>
<a name="l00502"></a>00502 <span class="comment"></span><span class="comment">    /**</span>
<a name="l00503"></a>00503 <span class="comment">  * The destructor currently has no assignment as the class does not dynamically</span>
<a name="l00504"></a>00504 <span class="comment">  * memory allocation. It also does not extract itself from the parent chain</span>
<a name="l00505"></a>00505 <span class="comment">  * and does not tigger an update of the parent item.</span>
<a name="l00506"></a>00506 <span class="comment">  */</span>
<a name="l00507"></a>00507     <span class="keyword">virtual</span>             <a class="code" href="class_e_t_sub_item.html#ade1f3cbfe48c23ecd3dfaf9e71040d39" title="destructor">~ETSubItem</a>      ( <span class="keywordtype">void</span> );
<a name="l00508"></a>00508 
<a name="l00509"></a>00509 <span class="comment"></span>
<a name="l00510"></a>00510 <span class="comment">    /// removes the item from the ETI_CplxTxt item; may tigger an update</span>
<a name="l00511"></a>00511 <span class="comment"></span><span class="comment">    /**</span>
<a name="l00512"></a>00512 <span class="comment">   *    If multiple sub-items belonging to the</span>
<a name="l00513"></a>00513 <span class="comment">   *    same ETI_CplxTxt item have to be changed, \b b_recomp parameter may be</span>
<a name="l00514"></a>00514 <span class="comment">   *    set to false to prevent the function from recomputing all sub-items</span>
<a name="l00515"></a>00515 <span class="comment">   *    involved. The caller is responsible for calling ETI_CplxTxt::recompute()</span>
<a name="l00516"></a>00516 <span class="comment">   *    when all changes were applied.</span>
<a name="l00517"></a>00517 <span class="comment">   */</span>
<a name="l00518"></a>00518     <span class="keywordtype">void</span>                <span class="keyword">remove</span>          (
<a name="l00519"></a>00519         <span class="keywordtype">bool</span>            b_recomp = <span class="keyword">true</span> <span class="comment">/**&lt; should the ETI_CplxTxt</span>
<a name="l00520"></a>00520 <span class="comment">        item be redrawn?*/</span>
<a name="l00521"></a>00521         );
<a name="l00522"></a>00522 
<a name="l00523"></a>00523 <span class="comment"></span>
<a name="l00524"></a>00524 <span class="comment">    /// informed when a direct kid is about to be removed</span>
<a name="l00525"></a>00525 <span class="comment"></span><span class="comment">    /**</span>
<a name="l00526"></a>00526 <span class="comment">    *   The sub-item is only required to remove the kid from internal</span>
<a name="l00527"></a>00527 <span class="comment">    *   chain if it has one. It is intended to be used by complex</span>
<a name="l00528"></a>00528 <span class="comment">    *   sub-items that may host other sub-items.</span>
<a name="l00529"></a>00529 <span class="comment">    */</span>
<a name="l00530"></a><a class="code" href="class_e_t_sub_item.html#a062688dc88d505fb19be5a72f741be43">00530</a>     <span class="keyword">virtual</span> <span class="keywordtype">void</span>        <a class="code" href="class_e_t_sub_item.html#a062688dc88d505fb19be5a72f741be43" title="informed when a direct kid is about to be removed">ackRemoveKid</a>    (<a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a> * kid) { Q_UNUSED(kid); }
<a name="l00531"></a>00531 
<a name="l00532"></a>00532 
<a name="l00533"></a>00533 
<a name="l00534"></a>00534 
<a name="l00535"></a>00535 
<a name="l00536"></a>00536 
<a name="l00537"></a>00537     <span class="comment">/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */</span><span class="comment"></span>
<a name="l00538"></a>00538 <span class="comment">    /** @name Apparence (font, color)    */</span><span class="comment"></span>
<a name="l00539"></a>00539 <span class="comment">    //@{</span>
<a name="l00540"></a>00540 <span class="comment"></span>    <span class="comment">/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */</span>
<a name="l00541"></a>00541 
<a name="l00542"></a>00542 <span class="comment"></span>
<a name="l00543"></a>00543 <span class="comment">    /// default font</span>
<a name="l00544"></a>00544 <span class="comment"></span>    QFont               <a class="code" href="class_e_t_sub_item.html#a272d8d9d868d76ec81cf4ec697d2639e" title="default font">font</a>            ( <span class="keywordtype">void</span> ) <span class="keyword">const</span>;
<a name="l00545"></a>00545 
<a name="l00546"></a>00546 <span class="comment"></span>
<a name="l00547"></a>00547 <span class="comment">    /// set default font</span>
<a name="l00548"></a>00548 <span class="comment"></span>    <span class="keywordtype">void</span>                <a class="code" href="class_e_t_sub_item.html#ad851ea369418f6017e39cc9c96c108db" title="set default font">setFont</a>         (QFont new_font);
<a name="l00549"></a>00549 
<a name="l00550"></a>00550 <span class="comment"></span>
<a name="l00551"></a>00551 <span class="comment">    /// tell if the sub-item inherits the font or uses it&#39;s own</span>
<a name="l00552"></a><a class="code" href="class_e_t_sub_item.html#a6a5005b03cbfc320dad9a38809a2717d">00552</a> <span class="comment"></span>    <span class="keywordtype">bool</span>                <a class="code" href="class_e_t_sub_item.html#a6a5005b03cbfc320dad9a38809a2717d" title="tell if the sub-item inherits the font or uses it&#39;s own">inheritsFont</a>    ( <span class="keywordtype">void</span> )<span class="keyword"> const</span>
<a name="l00553"></a>00553 <span class="keyword">    </span>{ <span class="keywordflow">return</span> ((<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> &amp; <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a01ebc2d8cfadac52c4633ff69c2f6b31">FONT_MOD</a>) == 0); }
<a name="l00554"></a>00554 
<a name="l00555"></a>00555 <span class="comment"></span>
<a name="l00556"></a>00556 <span class="comment">    /// default color</span>
<a name="l00557"></a><a class="code" href="class_e_t_sub_item.html#affda8a972e382bd53cb37db2852aec3e">00557</a> <span class="comment"></span>    QColor              <a class="code" href="class_e_t_sub_item.html#affda8a972e382bd53cb37db2852aec3e" title="default color">color</a>           ( <span class="keywordtype">void</span> )<span class="keyword"> const</span>
<a name="l00558"></a>00558 <span class="keyword">    </span>{ <span class="keywordflow">return</span> <a class="code" href="class_e_t_sub_item.html#abbe3ddeaaaeb14e18837d7cfd4180fe3" title="color used to paint this item">itm_col</a>; }
<a name="l00559"></a>00559 
<a name="l00560"></a>00560 <span class="comment"></span>
<a name="l00561"></a>00561 <span class="comment">    /// set default color</span>
<a name="l00562"></a>00562 <span class="comment"></span>    <span class="keywordtype">void</span>                <a class="code" href="class_e_t_sub_item.html#a47c036ee19c7e4557588f11d43c940fe" title="set default color">setColor</a>        (QColor new_color);
<a name="l00563"></a>00563 
<a name="l00564"></a>00564 <span class="comment"></span>
<a name="l00565"></a>00565 <span class="comment">    /// tell if the sub-item inherits the font or uses it&#39;s own</span>
<a name="l00566"></a><a class="code" href="class_e_t_sub_item.html#aa883fef005da263c7b8465f9fde9ec7c">00566</a> <span class="comment"></span>    <span class="keywordtype">bool</span>                <a class="code" href="class_e_t_sub_item.html#aa883fef005da263c7b8465f9fde9ec7c" title="tell if the sub-item inherits the font or uses it&#39;s own">inheritsColor</a>   ( <span class="keywordtype">void</span> )<span class="keyword"> const</span>
<a name="l00567"></a>00567 <span class="keyword">    </span>{ <span class="keywordflow">return</span> ((<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> &amp; <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055adf362be8b7054ea6af97d43b7eb694ef">COL_MOD</a>) == 0); }
<a name="l00568"></a>00568 
<a name="l00569"></a>00569 <span class="comment"></span>
<a name="l00570"></a>00570 <span class="comment">    /// default pen</span>
<a name="l00571"></a><a class="code" href="class_e_t_sub_item.html#ac960611f6c6a2800c40c30e358c06301">00571</a> <span class="comment"></span>    QColor              <a class="code" href="class_e_t_sub_item.html#ac960611f6c6a2800c40c30e358c06301" title="default pen">pen</a>         ( <span class="keywordtype">void</span> )<span class="keyword"> const</span>
<a name="l00572"></a>00572 <span class="keyword">    </span>{ <span class="keywordflow">return</span> <a class="code" href="class_e_t_sub_item.html#abf16c501488190ec6a55b402978723c1" title="the rgb used to paint text, draw lines, ...">itm_pen</a>; }
<a name="l00573"></a>00573 
<a name="l00574"></a>00574 <span class="comment"></span>
<a name="l00575"></a>00575 <span class="comment">    /// set default color</span>
<a name="l00576"></a>00576 <span class="comment"></span>    <span class="keywordtype">void</span>                <a class="code" href="class_e_t_sub_item.html#ad67d15830b8bf3c09c838cefe39fac59" title="set default color">setPen</a>      (QRgb new_color);
<a name="l00577"></a>00577 
<a name="l00578"></a>00578 <span class="comment"></span>
<a name="l00579"></a>00579 <span class="comment">    /// tell if the sub-item inherits the font or uses it&#39;s own</span>
<a name="l00580"></a><a class="code" href="class_e_t_sub_item.html#a864c91187ae6dfbd7420b5a5bc192369">00580</a> <span class="comment"></span>    <span class="keywordtype">bool</span>                <a class="code" href="class_e_t_sub_item.html#a864c91187ae6dfbd7420b5a5bc192369" title="tell if the sub-item inherits the font or uses it&#39;s own">inheritsPen</a> ( <span class="keywordtype">void</span> )<span class="keyword"> const</span>
<a name="l00581"></a>00581 <span class="keyword">    </span>{ <span class="keywordflow">return</span> ((<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> &amp; <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a3d93efa3d56a84ecbd6a997dcacd22f5">PEN_MOD</a>) == 0); }
<a name="l00582"></a>00582 
<a name="l00583"></a>00583 <span class="comment"></span>
<a name="l00584"></a>00584 <span class="comment">    //@}</span>
<a name="l00585"></a>00585 <span class="comment"></span>    <span class="comment">/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */</span>
<a name="l00586"></a>00586 
<a name="l00587"></a>00587 
<a name="l00588"></a>00588 
<a name="l00589"></a>00589 
<a name="l00590"></a>00590     <span class="comment">/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */</span><span class="comment"></span>
<a name="l00591"></a>00591 <span class="comment">    /** @name Dimensions. Bounding box.    */</span><span class="comment"></span>
<a name="l00592"></a>00592 <span class="comment">    //@{</span>
<a name="l00593"></a>00593 <span class="comment"></span>    <span class="comment">/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */</span>
<a name="l00594"></a>00594 
<a name="l00595"></a>00595 <span class="comment"></span>
<a name="l00596"></a>00596 <span class="comment">    /// the bounding box</span>
<a name="l00597"></a><a class="code" href="class_e_t_sub_item.html#adf58f56e8ceb21c5bdfce3effa09816b">00597</a> <span class="comment"></span>    QRectF              <a class="code" href="class_e_t_sub_item.html#adf58f56e8ceb21c5bdfce3effa09816b" title="the bounding box">boundingBox</a>     ( <span class="keywordtype">void</span> )<span class="keyword"> const</span>
<a name="l00598"></a>00598 <span class="keyword">    </span>{ <span class="keywordflow">return</span> <a class="code" href="class_e_t_sub_item.html#a8a82d3aad7a84597b451240dc75a0cb4" title="the boundingg box in local coordinates">bbox</a>; }
<a name="l00599"></a>00599 <span class="comment"></span>
<a name="l00600"></a>00600 <span class="comment">    /// only the width of this item</span>
<a name="l00601"></a><a class="code" href="class_e_t_sub_item.html#afeb732b930f8c4c607b44cf4a379c195">00601</a> <span class="comment"></span>    qreal               <a class="code" href="class_e_t_sub_item.html#afeb732b930f8c4c607b44cf4a379c195" title="only the width of this item">width</a>           ( <span class="keywordtype">void</span> )<span class="keyword"> const</span>
<a name="l00602"></a>00602 <span class="keyword">    </span>{ <span class="keywordflow">return</span> <a class="code" href="class_e_t_sub_item.html#a8a82d3aad7a84597b451240dc75a0cb4" title="the boundingg box in local coordinates">bbox</a>.width(); }
<a name="l00603"></a>00603 <span class="comment"></span>
<a name="l00604"></a>00604 <span class="comment">    /// only the height of this item</span>
<a name="l00605"></a><a class="code" href="class_e_t_sub_item.html#aaa4ca9604968ddcc0f2be8b7881f544c">00605</a> <span class="comment"></span>    qreal               <a class="code" href="class_e_t_sub_item.html#aaa4ca9604968ddcc0f2be8b7881f544c" title="only the height of this item">height</a>          ( <span class="keywordtype">void</span> )<span class="keyword"> const</span>
<a name="l00606"></a>00606 <span class="keyword">    </span>{ <span class="keywordflow">return</span> <a class="code" href="class_e_t_sub_item.html#a8a82d3aad7a84597b451240dc75a0cb4" title="the boundingg box in local coordinates">bbox</a>.height(); }
<a name="l00607"></a>00607 
<a name="l00608"></a>00608 
<a name="l00609"></a>00609 
<a name="l00610"></a>00610 
<a name="l00611"></a>00611 
<a name="l00612"></a>00612 <span class="keyword">public</span>:<span class="comment"></span>
<a name="l00613"></a>00613 <span class="comment">    /// tell if this item&#39;s own elements were changed */</span>
<a name="l00614"></a><a class="code" href="class_e_t_sub_item.html#a84b95edd9b28f74f0db365850d92d3c7">00614</a> <span class="comment"></span>    <span class="keywordtype">bool</span>        <a class="code" href="class_e_t_sub_item.html#a84b95edd9b28f74f0db365850d92d3c7" title="tell if this item&#39;s own elements were changed */">isSizeDirty</a>             ( <span class="keywordtype">void</span> )<span class="keyword"> const</span>
<a name="l00615"></a>00615 <span class="keyword">    </span>{ <span class="keywordflow">return</span> ((<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> &amp; <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055adf078dcde0bd69a7a700a6751056dee6">SIZE_DIRTY</a>) != 0); }
<a name="l00616"></a>00616 
<a name="l00617"></a>00617 <span class="comment"></span>
<a name="l00618"></a>00618 <span class="comment">    /// tell if this item&#39;s kids were changed */</span>
<a name="l00619"></a><a class="code" href="class_e_t_sub_item.html#a580ec8d2a758423e33cca980a2e9b5fb">00619</a> <span class="comment"></span>    <span class="keywordtype">bool</span>        <a class="code" href="class_e_t_sub_item.html#a580ec8d2a758423e33cca980a2e9b5fb" title="tell if this item&#39;s kids were changed */">isKidSizeDirty</a>          ( <span class="keywordtype">void</span> )<span class="keyword"> const</span>
<a name="l00620"></a>00620 <span class="keyword">    </span>{ <span class="keywordflow">return</span> ((<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> &amp; <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a655f796a2c5b4b0dc00d95390ca6ca17">KID_SIZE_DIRTY</a>) != 0); }
<a name="l00621"></a>00621 <span class="comment"></span>
<a name="l00622"></a>00622 <span class="comment">    /// tell if any of the sizeflags are set</span>
<a name="l00623"></a><a class="code" href="class_e_t_sub_item.html#aba670d309679d9c1c93c92c563cf51ca">00623</a> <span class="comment"></span>    <span class="keywordtype">bool</span>        <a class="code" href="class_e_t_sub_item.html#aba670d309679d9c1c93c92c563cf51ca" title="tell if any of the sizeflags are set">requireRecompute</a>        ( <span class="keywordtype">void</span> )<span class="keyword"> const</span>
<a name="l00624"></a>00624 <span class="keyword">    </span>{ <span class="keywordflow">return</span> ((<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> &amp; (<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a655f796a2c5b4b0dc00d95390ca6ca17">KID_SIZE_DIRTY</a> | <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055adf078dcde0bd69a7a700a6751056dee6">SIZE_DIRTY</a>)) != 0); }
<a name="l00625"></a>00625 
<a name="l00626"></a>00626 <span class="keyword">protected</span>:
<a name="l00627"></a>00627 <span class="comment"></span>
<a name="l00628"></a>00628 <span class="comment">    /// marks this item and all it&#39;s parents as being required to be recomputed</span>
<a name="l00629"></a>00629 <span class="comment"></span>    <span class="keywordtype">void</span>        <a class="code" href="class_e_t_sub_item.html#ab162bc8bf3933ee501bcbc599b6a40f6" title="marks this item and all it&#39;s parents as being required to be recomputed">setSizeDirty</a>            (<a class="code" href="class_e_t_i___cplx_txt.html" title="class representing a complex text; this may or may not represent an equation">ETI_CplxTxt</a> ** tp_fth = <a class="code" href="aclass__ddhc_8cc.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>);
<a name="l00630"></a>00630 
<a name="l00631"></a>00631 <span class="comment"></span>
<a name="l00632"></a>00632 <span class="comment">    /// resets the flag marking the sub-item as being required to be recomputed</span>
<a name="l00633"></a><a class="code" href="class_e_t_sub_item.html#a9254409fd7b789a4d18edc594395cf73">00633</a> <span class="comment"></span>    <span class="keywordtype">void</span>        <a class="code" href="class_e_t_sub_item.html#a9254409fd7b789a4d18edc594395cf73" title="resets the flag marking the sub-item as being required to be recomputed">resetSizeDirty</a>          ( <span class="keywordtype">void</span> )
<a name="l00634"></a>00634     { <a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> = (<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055" title="one bit switches">Flags</a>)(<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> &amp; (~<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055adf078dcde0bd69a7a700a6751056dee6">SIZE_DIRTY</a>)); }
<a name="l00635"></a>00635 
<a name="l00636"></a>00636 <span class="comment"></span>
<a name="l00637"></a>00637 <span class="comment">    /// marks this sub-item as having kids required to be recomputed</span>
<a name="l00638"></a><a class="code" href="class_e_t_sub_item.html#aefd171024f4fa2177be04d556fb5c1ea">00638</a> <span class="comment"></span>    <span class="keywordtype">void</span>        <a class="code" href="class_e_t_sub_item.html#aefd171024f4fa2177be04d556fb5c1ea" title="marks this sub-item as having kids required to be recomputed">setKidSizeDirty</a>         ( <span class="keywordtype">void</span> )
<a name="l00639"></a>00639     { <a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> = (<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055" title="one bit switches">Flags</a>)(<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> | <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a655f796a2c5b4b0dc00d95390ca6ca17">KID_SIZE_DIRTY</a>); }
<a name="l00640"></a>00640 
<a name="l00641"></a>00641 <span class="comment"></span>
<a name="l00642"></a>00642 <span class="comment">    /// resets the flag marking the sub-item as having kids required to be recomputed</span>
<a name="l00643"></a><a class="code" href="class_e_t_sub_item.html#a3e13a8721de3981072d80b24156c9674">00643</a> <span class="comment"></span>    <span class="keywordtype">void</span>        <a class="code" href="class_e_t_sub_item.html#a3e13a8721de3981072d80b24156c9674" title="resets the flag marking the sub-item as having kids required to be recomputed">resetKidSizeDirty</a>       ( <span class="keywordtype">void</span> )
<a name="l00644"></a>00644     { <a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> = (<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055" title="one bit switches">Flags</a>)(<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> &amp; (~<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a655f796a2c5b4b0dc00d95390ca6ca17">KID_SIZE_DIRTY</a>)); }
<a name="l00645"></a>00645 
<a name="l00646"></a>00646 <span class="comment"></span>
<a name="l00647"></a>00647 <span class="comment">    /// resets all the flags concearning size</span>
<a name="l00648"></a><a class="code" href="class_e_t_sub_item.html#a8f41d9e0bdd5b4ca549cf296c9f8fbf1">00648</a> <span class="comment"></span>    <span class="keywordtype">void</span>        <a class="code" href="class_e_t_sub_item.html#a8f41d9e0bdd5b4ca549cf296c9f8fbf1" title="resets all the flags concearning size">resetSizeFlags</a>          ( <span class="keywordtype">void</span> )
<a name="l00649"></a>00649     { <a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> = (<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055" title="one bit switches">Flags</a>)(<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> &amp; (~(<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a655f796a2c5b4b0dc00d95390ca6ca17">KID_SIZE_DIRTY</a> | <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055adf078dcde0bd69a7a700a6751056dee6">SIZE_DIRTY</a>))); }
<a name="l00650"></a>00650 
<a name="l00651"></a>00651 <span class="comment"></span>
<a name="l00652"></a>00652 <span class="comment">    /// get the bounding box of this item</span>
<a name="l00653"></a>00653 <span class="comment"></span><span class="comment">    /**</span>
<a name="l00654"></a>00654 <span class="comment">   *    The function may or may not honor the flags representing the &quot;dirty&quot;</span>
<a name="l00655"></a>00655 <span class="comment">   *    state of that item regarding it&#39;s characteristics depending on</span>
<a name="l00656"></a>00656 <span class="comment">   *    \b b_full argument (when true the flags are ignored)</span>
<a name="l00657"></a>00657 <span class="comment">   */</span>
<a name="l00658"></a>00658     <span class="keyword">virtual</span> <span class="keywordtype">void</span>    <a class="code" href="class_e_t_sub_item.html#ad6c9d01d209d216dd1a647511f10a431" title="get the bounding box of this item">recompute</a>           (<span class="keywordtype">bool</span> b_full) = 0;
<a name="l00659"></a>00659 
<a name="l00660"></a>00660 <span class="comment"></span>
<a name="l00661"></a>00661 <span class="comment">    //@}</span>
<a name="l00662"></a>00662 <span class="comment"></span>    <span class="comment">/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */</span>
<a name="l00663"></a>00663 
<a name="l00664"></a>00664 
<a name="l00665"></a>00665 
<a name="l00666"></a>00666 <span class="keyword">protected</span>:
<a name="l00667"></a>00667 
<a name="l00668"></a>00668 
<a name="l00669"></a>00669     <span class="comment">/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */</span><span class="comment"></span>
<a name="l00670"></a>00670 <span class="comment">    /** @name The coordinate system. Reference point.    */</span><span class="comment"></span>
<a name="l00671"></a>00671 <span class="comment">    //@{</span>
<a name="l00672"></a>00672 <span class="comment"></span>    <span class="comment">/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */</span>
<a name="l00673"></a>00673 
<a name="l00674"></a>00674 <span class="comment"></span>
<a name="l00675"></a>00675 <span class="comment">    /// tell the position of this item in parent&#39;s coordinate system</span>
<a name="l00676"></a><a class="code" href="class_e_t_sub_item.html#a8eba7b38ff5decd18fc642a99f66d855">00676</a> <span class="comment"></span>    qreal               <a class="code" href="class_e_t_sub_item.html#a8eba7b38ff5decd18fc642a99f66d855" title="tell the position of this item in parent&#39;s coordinate system">posX</a>            ( <span class="keywordtype">void</span> )<span class="keyword"> const</span>
<a name="l00677"></a>00677 <span class="keyword">    </span>{ <span class="keywordflow">return</span> <a class="code" href="class_e_t_sub_item.html#a3bf65adb5d5c0286f21791eb1d279c8f" title="position (in parent coordinate system)">x_pos</a>; }
<a name="l00678"></a>00678 
<a name="l00679"></a>00679 <span class="comment"></span>
<a name="l00680"></a>00680 <span class="comment">    /// set the position of this item in parent&#39;s coordinate system</span>
<a name="l00681"></a><a class="code" href="class_e_t_sub_item.html#a06f3b6fddb7f4fe2701b5be0a9c4e17b">00681</a> <span class="comment"></span>    <span class="keywordtype">void</span>                <a class="code" href="class_e_t_sub_item.html#a06f3b6fddb7f4fe2701b5be0a9c4e17b" title="set the position of this item in parent&#39;s coordinate system">setPosX</a>         (qreal new_X)
<a name="l00682"></a>00682     { <a class="code" href="class_e_t_sub_item.html#a3bf65adb5d5c0286f21791eb1d279c8f" title="position (in parent coordinate system)">x_pos</a> = new_X; }
<a name="l00683"></a>00683 
<a name="l00684"></a>00684 <span class="comment"></span>
<a name="l00685"></a>00685 <span class="comment">    //@}</span>
<a name="l00686"></a>00686 <span class="comment"></span>    <span class="comment">/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */</span>
<a name="l00687"></a>00687 
<a name="l00688"></a>00688 
<a name="l00689"></a>00689 
<a name="l00690"></a>00690 
<a name="l00691"></a>00691 <span class="keyword">public</span>:
<a name="l00692"></a>00692 
<a name="l00693"></a>00693     <span class="comment">/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */</span><span class="comment"></span>
<a name="l00694"></a>00694 <span class="comment">    /** @name Logic relations    */</span><span class="comment"></span>
<a name="l00695"></a>00695 <span class="comment">    //@{</span>
<a name="l00696"></a>00696 <span class="comment"></span>    <span class="comment">/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */</span>
<a name="l00697"></a>00697 
<a name="l00698"></a>00698 <span class="comment"></span>
<a name="l00699"></a>00699 <span class="comment">    /// return next item</span>
<a name="l00700"></a><a class="code" href="class_e_t_sub_item.html#a3df9a6599da92f5f26e8d030d5080df9">00700</a> <span class="comment"></span>    <span class="keyword">inline</span> <a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a>*   <a class="code" href="class_e_t_sub_item.html#a3df9a6599da92f5f26e8d030d5080df9" title="return next item">next</a>            ( <span class="keywordtype">void</span> )
<a name="l00701"></a>00701     { <span class="keywordflow">return</span> (<a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a>*)<a class="code" href="class_e_t_sub_item.html#a3df9a6599da92f5f26e8d030d5080df9" title="return next item">CC_L2D::next</a>(); }
<a name="l00702"></a>00702 
<a name="l00703"></a>00703 <span class="comment"></span>
<a name="l00704"></a>00704 <span class="comment">    /// return previous item</span>
<a name="l00705"></a><a class="code" href="class_e_t_sub_item.html#abb6564cd7327657f8739dde913dda297">00705</a> <span class="comment"></span>    <span class="keyword">inline</span> <a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a>*   <a class="code" href="class_e_t_sub_item.html#abb6564cd7327657f8739dde913dda297" title="return previous item">prev</a>            ( <span class="keywordtype">void</span> )
<a name="l00706"></a>00706     { <span class="keywordflow">return</span> (<a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a>*)<a class="code" href="class_e_t_sub_item.html#abb6564cd7327657f8739dde913dda297" title="return previous item">CC_L2D::prev</a>(); }
<a name="l00707"></a>00707 
<a name="l00708"></a>00708 <span class="comment"></span>
<a name="l00709"></a>00709 <span class="comment">    /// tell if this element is top level or not</span>
<a name="l00710"></a><a class="code" href="class_e_t_sub_item.html#a3e77afb2709213c489e3d9d0c09cb13f">00710</a> <span class="comment"></span>    <span class="keywordtype">bool</span>                <a class="code" href="class_e_t_sub_item.html#a3e77afb2709213c489e3d9d0c09cb13f" title="tell if this element is top level or not">isTopLevel</a>      ( <span class="keywordtype">void</span> )<span class="keyword"> const</span>
<a name="l00711"></a>00711 <span class="keyword">    </span>{ <span class="keywordflow">return</span> ((<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> &amp; <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a3ff699dba1c7431469e07f63e23b15d7">CHILD_ITEM</a>) == 0); }
<a name="l00712"></a>00712 
<a name="l00713"></a>00713 <span class="comment"></span>
<a name="l00714"></a>00714 <span class="comment">    /// set the father item</span>
<a name="l00715"></a><a class="code" href="class_e_t_sub_item.html#a4786958a58e030520b07351f3dab6c4c">00715</a> <span class="comment"></span>    <span class="keyword">inline</span> <span class="keywordtype">void</span>         <a class="code" href="class_e_t_sub_item.html#a4786958a58e030520b07351f3dab6c4c" title="set the father item">setFather</a>       (<a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a> * new_fth)
<a name="l00716"></a>00716     { <a class="code" href="class_e_t_sub_item.html#a45307ad1bf08b9516e293d69e60cf030">fth</a>.fth_sub_i = new_fth; <a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> = (<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055" title="one bit switches">Flags</a>)(<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> | <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a3ff699dba1c7431469e07f63e23b15d7">CHILD_ITEM</a>); }
<a name="l00717"></a>00717 
<a name="l00718"></a>00718 <span class="comment"></span>
<a name="l00719"></a>00719 <span class="comment">    /// get the father item</span>
<a name="l00720"></a><a class="code" href="class_e_t_sub_item.html#a0a367e98b76ea54e1d0c6edf7053330c">00720</a> <span class="comment"></span>    <span class="keyword">inline</span> <a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a> *  <a class="code" href="class_e_t_sub_item.html#a0a367e98b76ea54e1d0c6edf7053330c" title="get the father item">fatherSubI</a>      ( <span class="keywordtype">void</span> )<span class="keyword"> const</span>
<a name="l00721"></a>00721 <span class="keyword">    </span>{ <span class="keywordflow">if</span> (<a class="code" href="class_e_t_sub_item.html#a3e77afb2709213c489e3d9d0c09cb13f" title="tell if this element is top level or not">isTopLevel</a>()) <span class="keywordflow">return</span> <a class="code" href="aclass__ddhc_8cc.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>; <span class="keywordflow">return</span> <a class="code" href="class_e_t_sub_item.html#a45307ad1bf08b9516e293d69e60cf030">fth</a>.fth_sub_i; }
<a name="l00722"></a>00722 
<a name="l00723"></a>00723 <span class="comment"></span>
<a name="l00724"></a>00724 <span class="comment">    /// set the father complex text</span>
<a name="l00725"></a><a class="code" href="class_e_t_sub_item.html#ad6c7ae90224e0108d79a3dd0ba119ac8">00725</a> <span class="comment"></span>    <span class="keyword">inline</span> <span class="keywordtype">void</span>         <a class="code" href="class_e_t_sub_item.html#a4786958a58e030520b07351f3dab6c4c" title="set the father item">setFather</a>       (<a class="code" href="class_e_t_i___cplx_txt.html" title="class representing a complex text; this may or may not represent an equation">ETI_CplxTxt</a> * new_fth)
<a name="l00726"></a>00726     { <a class="code" href="class_e_t_sub_item.html#a45307ad1bf08b9516e293d69e60cf030">fth</a>.fth_cplx = new_fth; <a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> = (<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055" title="one bit switches">Flags</a>)(<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> &amp; (~<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a3ff699dba1c7431469e07f63e23b15d7">CHILD_ITEM</a>)); }
<a name="l00727"></a>00727 
<a name="l00728"></a>00728 <span class="comment"></span>
<a name="l00729"></a>00729 <span class="comment">    /// get the ETI_CplxTxt father (complex text)</span>
<a name="l00730"></a>00730 <span class="comment"></span>    <a class="code" href="class_e_t_i___cplx_txt.html" title="class representing a complex text; this may or may not represent an equation">ETI_CplxTxt</a>  *      <a class="code" href="class_e_t_sub_item.html#a73078f093b83442fb1729f6f35bee29f" title="get the ETI_CplxTxt father (complex text)">fatherCplx</a>      ( <span class="keywordtype">void</span> ) <span class="keyword">const</span>;
<a name="l00731"></a>00731 
<a name="l00732"></a>00732 <span class="comment"></span>
<a name="l00733"></a>00733 <span class="comment">    //@}</span>
<a name="l00734"></a>00734 <span class="comment"></span>    <span class="comment">/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */</span>
<a name="l00735"></a>00735 
<a name="l00736"></a>00736 
<a name="l00737"></a>00737 <span class="keyword">protected</span>:
<a name="l00738"></a>00738 
<a name="l00739"></a>00739     <span class="comment">/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */</span><span class="comment"></span>
<a name="l00740"></a>00740 <span class="comment">    /** @name Item statuses    */</span><span class="comment"></span>
<a name="l00741"></a>00741 <span class="comment">    //@{</span>
<a name="l00742"></a>00742 <span class="comment"></span>    <span class="comment">/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */</span>
<a name="l00743"></a>00743 <span class="comment"></span>
<a name="l00744"></a>00744 <span class="comment">    /// marks this item as having a &quot;true&quot; value</span>
<a name="l00745"></a><a class="code" href="class_e_t_sub_item.html#a9c8cba134cc2f1b422a7a167a2d4fea2">00745</a> <span class="comment"></span>    <span class="keywordtype">void</span>        <a class="code" href="class_e_t_sub_item.html#a9c8cba134cc2f1b422a7a167a2d4fea2" title="marks this item as having a &quot;true&quot; value">setInitialised</a>          ( <span class="keywordtype">void</span> )
<a name="l00746"></a>00746     { <a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> = (<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055" title="one bit switches">Flags</a>)(<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> &amp; (~<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a617508f4c9d8068e0e2017e2862ff482">DEFAULT_STATE</a>)); }
<a name="l00747"></a>00747 <span class="comment"></span>
<a name="l00748"></a>00748 <span class="comment">    /// marks this item as having no &quot;real&quot; value</span>
<a name="l00749"></a><a class="code" href="class_e_t_sub_item.html#a6a6efc1297e7cbf568b2f0983db45861">00749</a> <span class="comment"></span>    <span class="keywordtype">void</span>        <a class="code" href="class_e_t_sub_item.html#a6a6efc1297e7cbf568b2f0983db45861" title="marks this item as having no &quot;real&quot; value">setUninitialised</a>        ( <span class="keywordtype">void</span> )
<a name="l00750"></a>00750     { <a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> = (<a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055" title="one bit switches">Flags</a>)(<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> | <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a617508f4c9d8068e0e2017e2862ff482">DEFAULT_STATE</a>); }
<a name="l00751"></a>00751 <span class="comment"></span>
<a name="l00752"></a>00752 <span class="comment">    /// tells if the item is in initialised (true) or uninitialised state (false)</span>
<a name="l00753"></a><a class="code" href="class_e_t_sub_item.html#ad25d8b608b4803e5613067b3c07a2724">00753</a> <span class="comment"></span>    <span class="keywordtype">bool</span>        <a class="code" href="class_e_t_sub_item.html#ad25d8b608b4803e5613067b3c07a2724" title="tells if the item is in initialised (true) or uninitialised state (false)">isInitialised</a>           ( <span class="keywordtype">void</span> )<span class="keyword"> const</span>
<a name="l00754"></a>00754 <span class="keyword">    </span>{ <span class="keywordflow">return</span> ((<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> &amp; <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055a617508f4c9d8068e0e2017e2862ff482">DEFAULT_STATE</a>) == 0); }
<a name="l00755"></a>00755 
<a name="l00756"></a>00756 <span class="comment"></span>
<a name="l00757"></a>00757 <span class="comment">    /// visually deselected; this is not the same thing as the current si</span>
<a name="l00758"></a>00758 <span class="comment"></span>    <span class="keywordtype">void</span>        <a class="code" href="class_e_t_sub_item.html#adc77ab1f44d683c75355b5cf4c519b53" title="visually deselected; this is not the same thing as the current si">deselect</a>                (
<a name="l00759"></a>00759         <a class="code" href="class_e_t_i___cplx_txt.html" title="class representing a complex text; this may or may not represent an equation">ETI_CplxTxt</a> **  fth_ = <a class="code" href="aclass__ddhc_8cc.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>,    <span class="comment">/**&lt; variable that stores a pointer to father;</span>
<a name="l00760"></a>00760 <span class="comment">if NULL is provided, the function will use fatherCplx() to find it&#39;s parent;</span>
<a name="l00761"></a>00761 <span class="comment">if points to a NULL value, the function will save the parent it finds;</span>
<a name="l00762"></a>00762 <span class="comment">if valid, the pointer is used; no need for a call to fatherCplx() */</span>
<a name="l00763"></a>00763         <span class="keywordtype">bool</span>            b_redraw = <span class="keyword">true</span> <span class="comment">/**&lt; if set to true, the ETI_CplxTxt</span>
<a name="l00764"></a>00764 <span class="comment">item is redrawn, otherwise the caller is expected to redraw the item itself */</span>
<a name="l00765"></a>00765         );
<a name="l00766"></a>00766 <span class="comment"></span>
<a name="l00767"></a>00767 <span class="comment">    /// visually selected; this is not the same thing as the current si</span>
<a name="l00768"></a>00768 <span class="comment"></span>    <span class="keywordtype">void</span>        <a class="code" href="class_e_t_sub_item.html#a735df5a65b61d9a1dc508f4f687d225c" title="visually selected; this is not the same thing as the current si">select</a>                  (
<a name="l00769"></a>00769         <a class="code" href="class_e_t_i___cplx_txt.html" title="class representing a complex text; this may or may not represent an equation">ETI_CplxTxt</a> **  fth_ = <a class="code" href="aclass__ddhc_8cc.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>,    <span class="comment">/**&lt; variable that stores a pointer to father;</span>
<a name="l00770"></a>00770 <span class="comment">if NULL is provided, the function will use fatherCplx() to find it&#39;s parent;</span>
<a name="l00771"></a>00771 <span class="comment">if points to a NULL value, the function will save the parent it finds;</span>
<a name="l00772"></a>00772 <span class="comment">if valid, the pointer is used; no need for a call to fatherCplx() */</span>
<a name="l00773"></a>00773         <span class="keywordtype">bool</span>            b_redraw = <span class="keyword">true</span> <span class="comment">/**&lt; if set to true, the ETI_CplxTxt</span>
<a name="l00774"></a>00774 <span class="comment">item is redrawn, otherwise the caller is expected to redraw the item itself */</span>
<a name="l00775"></a>00775         );
<a name="l00776"></a>00776 <span class="comment"></span>
<a name="l00777"></a>00777 <span class="comment">    /// tell if visually selected; this is not the same thing as the current si</span>
<a name="l00778"></a><a class="code" href="class_e_t_sub_item.html#aa9af4f4a692972fa0e6738a1680d8068">00778</a> <span class="comment"></span>    <span class="keywordtype">bool</span>        <a class="code" href="class_e_t_sub_item.html#aa9af4f4a692972fa0e6738a1680d8068" title="tell if visually selected; this is not the same thing as the current si">isSelected</a>              ( <span class="keywordtype">void</span> )<span class="keyword"> const</span>
<a name="l00779"></a>00779 <span class="keyword">    </span>{ <span class="keywordflow">return</span> ((<a class="code" href="class_e_t_sub_item.html#abe859281d88364b079d3959af7e16812" title="various 1 bit switches">flg</a> &amp; <a class="code" href="class_e_t_sub_item.html#a6e3b59f4a84a8ac86ce8ac651bd19055ad808a4cbe31e2afd93afc9ecef98bb47">SELECTED</a>) != 0); }
<a name="l00780"></a>00780 
<a name="l00781"></a>00781 
<a name="l00782"></a>00782 <span class="comment"></span>
<a name="l00783"></a>00783 <span class="comment">    //@}</span>
<a name="l00784"></a>00784 <span class="comment"></span>    <span class="comment">/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */</span>
<a name="l00785"></a>00785 
<a name="l00786"></a>00786 
<a name="l00787"></a>00787 
<a name="l00788"></a>00788 <span class="keyword">protected</span>:
<a name="l00789"></a>00789 
<a name="l00790"></a>00790 
<a name="l00791"></a>00791     <span class="comment">/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */</span><span class="comment"></span>
<a name="l00792"></a>00792 <span class="comment">    /** @name Drawing. Visual clues.    */</span><span class="comment"></span>
<a name="l00793"></a>00793 <span class="comment">    //@{</span>
<a name="l00794"></a>00794 <span class="comment"></span>    <span class="comment">/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */</span>
<a name="l00795"></a>00795 
<a name="l00796"></a>00796 <span class="comment"></span>
<a name="l00797"></a>00797 <span class="comment">    /// paint the element on provided surface</span>
<a name="l00798"></a>00798 <span class="comment"></span><span class="comment">    /**</span>
<a name="l00799"></a>00799 <span class="comment">   *    When an paint event occurs in ETI_CplxTxt, the item will iterate all it&#39;s</span>
<a name="l00800"></a>00800 <span class="comment">   *    sub-items and ask them to paint themselves with an paint() call.</span>
<a name="l00801"></a>00801 <span class="comment">   *    At that point, the item is required to call prePaint(), then do it&#39;s</span>
<a name="l00802"></a>00802 <span class="comment">   *    drawing, then call postPaint().</span>
<a name="l00803"></a>00803 <span class="comment">   *</span>
<a name="l00804"></a>00804 <span class="comment">   *    A crucial element in painting sub-items is PaintData structure. Inside</span>
<a name="l00805"></a>00805 <span class="comment">   *    paint() function the sub-item will crete a local PaintData structure</span>
<a name="l00806"></a>00806 <span class="comment">   *    initialised with the elements it knows</span>
<a name="l00807"></a>00807 <span class="comment">   */</span>
<a name="l00808"></a>00808     <span class="keyword">virtual</span> <span class="keywordtype">void</span>        <a class="code" href="class_e_t_sub_item.html#a00ea648d943ad71534946af23dac66d3" title="paint the element on provided surface">paint</a>           (
<a name="l00809"></a>00809         <a class="code" href="class_e_t_sheet_view.html" title="Widget capable of displaying an ETSheet content.">ETSheetView</a> *       vp,     <span class="comment">/**&lt; represents the viewport where</span>
<a name="l00810"></a>00810 <span class="comment">         the painting takes place */</span>
<a name="l00811"></a>00811         QPainter *          painter,<span class="comment">/**&lt; we&#39;re required to draw on</span>
<a name="l00812"></a>00812 <span class="comment">         this object */</span>
<a name="l00813"></a>00813         QPointF             pt_ref  <span class="comment">/**&lt; the coordinates of the reference</span>
<a name="l00814"></a>00814 <span class="comment">         point of this sub-item in \b painter coordinate system */</span>
<a name="l00815"></a>00815         ) = 0;
<a name="l00816"></a>00816 
<a name="l00817"></a>00817 <span class="comment"></span>
<a name="l00818"></a>00818 <span class="comment">    /// items need to call this function before proceeding with their painting</span>
<a name="l00819"></a>00819 <span class="comment"></span><span class="comment">    /**</span>
<a name="l00820"></a>00820 <span class="comment">   *    The function does initialization for the paint independent of</span>
<a name="l00821"></a>00821 <span class="comment">   *    the type of sub-item. If the item uses a particular font, different</span>
<a name="l00822"></a>00822 <span class="comment">   *    from what it&#39;s parent uses, it will select new font. Similar changes</span>
<a name="l00823"></a>00823 <span class="comment">   *    are made for the color to be used. Visual clues regarding the background</span>
<a name="l00824"></a>00824 <span class="comment">   *    of the sub-item (the bounding box) may be drawn in future implementations.</span>
<a name="l00825"></a>00825 <span class="comment">   *    Inside prePaint(), bounding box is computed and saved in painter coordinates.</span>
<a name="l00826"></a>00826 <span class="comment">   */</span>
<a name="l00827"></a>00827     <span class="keywordtype">void</span>                <a class="code" href="class_e_t_sub_item.html#a8f77fbbc99877833721e64159c488bc7" title="items need to call this function before proceeding with their painting">prePaint</a>            (
<a name="l00828"></a>00828         PaintData *         pd
<a name="l00829"></a>00829         );
<a name="l00830"></a>00830 
<a name="l00831"></a>00831 <span class="comment"></span>
<a name="l00832"></a>00832 <span class="comment">    /// items need to call this function after they&#39;ve done their painting</span>
<a name="l00833"></a>00833 <span class="comment"></span><span class="comment">    /**</span>
<a name="l00834"></a>00834 <span class="comment">   *    postPaint() draws visual clues about the sub-item on top of already painted</span>
<a name="l00835"></a>00835 <span class="comment">   *    item (like position of the cursor) and restores the state of the painter</span>
<a name="l00836"></a>00836 <span class="comment">   *    regarding the font and color.</span>
<a name="l00837"></a>00837 <span class="comment">   */</span>
<a name="l00838"></a>00838     <span class="keywordtype">void</span>                <a class="code" href="class_e_t_sub_item.html#af54fd0cff1c98f906d151a187438f4b6" title="items need to call this function after they&#39;ve done their painting">postPaint</a>           (
<a name="l00839"></a>00839         PaintData *         pd
<a name="l00840"></a>00840         );
<a name="l00841"></a>00841 
<a name="l00842"></a>00842 <span class="comment"></span>
<a name="l00843"></a>00843 <span class="comment">    //@}</span>
<a name="l00844"></a>00844 <span class="comment"></span>    <span class="comment">/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */</span>
<a name="l00845"></a>00845 
<a name="l00846"></a>00846 
<a name="l00847"></a>00847 
<a name="l00848"></a>00848 
<a name="l00849"></a>00849     <span class="comment">/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */</span><span class="comment"></span>
<a name="l00850"></a>00850 <span class="comment">    /** @name Navigation    */</span><span class="comment"></span>
<a name="l00851"></a>00851 <span class="comment">    //@{</span>
<a name="l00852"></a>00852 <span class="comment"></span>    <span class="comment">/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */</span>
<a name="l00853"></a>00853 
<a name="l00854"></a>00854 <span class="keyword">public</span>:
<a name="l00855"></a>00855 <span class="comment"></span>
<a name="l00856"></a>00856 <span class="comment">    /// recieves navigation keys</span>
<a name="l00857"></a>00857 <span class="comment"></span>    <span class="keywordtype">void</span>        <a class="code" href="class_e_t_sub_item.html#aae728c65d8df5afa81d9fa09450b3935" title="recieves navigation keys">navKey</a>              (
<a name="l00858"></a>00858         <a class="code" href="class_e_t_sheet_view.html" title="Widget capable of displaying an ETSheet content.">ETSheetView</a> *       vp,
<a name="l00859"></a>00859         Qt::Key             key
<a name="l00860"></a>00860         );
<a name="l00861"></a>00861 
<a name="l00862"></a>00862 
<a name="l00863"></a>00863 <span class="comment">//  /// recieves navigation keys</span>
<a name="l00864"></a>00864 <span class="comment">//  virtual void        navKey              (</span>
<a name="l00865"></a>00865 <span class="comment">//      ETSheetView *       vp,</span>
<a name="l00866"></a>00866 <span class="comment">//      Qt::Key             key</span>
<a name="l00867"></a>00867 <span class="comment">//      ) = 0;</span>
<a name="l00868"></a>00868 
<a name="l00869"></a>00869 
<a name="l00870"></a>00870 
<a name="l00871"></a>00871 <span class="keyword">protected</span>:
<a name="l00872"></a>00872 <span class="comment"></span>
<a name="l00873"></a>00873 <span class="comment">    /// the item is left from the top side</span>
<a name="l00874"></a>00874 <span class="comment"></span>    <span class="keywordtype">void</span>                <a class="code" href="class_e_t_sub_item.html#adc680ea038b38e9d6aa78d1bd3e1de37" title="the item is left from the top side">navLeaveTop</a>         (
<a name="l00875"></a>00875         <a class="code" href="class_e_t_i___cplx_txt.html" title="class representing a complex text; this may or may not represent an equation">ETI_CplxTxt</a> *   <a class="code" href="class_e_t_sub_item.html#a45307ad1bf08b9516e293d69e60cf030">fth</a>,
<a name="l00876"></a>00876         <a class="code" href="class_e_t_sheet_view.html" title="Widget capable of displaying an ETSheet content.">ETSheetView</a> *   vp
<a name="l00877"></a>00877         );
<a name="l00878"></a>00878 <span class="comment"></span>
<a name="l00879"></a>00879 <span class="comment">    /// the item is left from the bottom side</span>
<a name="l00880"></a>00880 <span class="comment"></span>    <span class="keywordtype">void</span>                <a class="code" href="class_e_t_sub_item.html#a5adba9613cefb440eb63e1c309bed50c" title="the item is left from the bottom side">navLeaveBtm</a>         (
<a name="l00881"></a>00881         <a class="code" href="class_e_t_i___cplx_txt.html" title="class representing a complex text; this may or may not represent an equation">ETI_CplxTxt</a> *   <a class="code" href="class_e_t_sub_item.html#a45307ad1bf08b9516e293d69e60cf030">fth</a>,
<a name="l00882"></a>00882         <a class="code" href="class_e_t_sheet_view.html" title="Widget capable of displaying an ETSheet content.">ETSheetView</a> *   vp
<a name="l00883"></a>00883         );
<a name="l00884"></a>00884 <span class="comment"></span>
<a name="l00885"></a>00885 <span class="comment">    /// the item is left from the top side</span>
<a name="l00886"></a>00886 <span class="comment"></span>    <span class="keywordtype">void</span>                <a class="code" href="class_e_t_sub_item.html#a5ddcb4f6470717f4e54d9170a06de0e9" title="the item is left from the top side">navLeaveLeft</a>        (
<a name="l00887"></a>00887         <a class="code" href="class_e_t_i___cplx_txt.html" title="class representing a complex text; this may or may not represent an equation">ETI_CplxTxt</a> *   <a class="code" href="class_e_t_sub_item.html#a45307ad1bf08b9516e293d69e60cf030">fth</a>,
<a name="l00888"></a>00888         <a class="code" href="class_e_t_sheet_view.html" title="Widget capable of displaying an ETSheet content.">ETSheetView</a> *   vp
<a name="l00889"></a>00889         );
<a name="l00890"></a>00890 <span class="comment"></span>
<a name="l00891"></a>00891 <span class="comment">    /// the item is left from the bottom side</span>
<a name="l00892"></a>00892 <span class="comment"></span>    <span class="keywordtype">void</span>                <a class="code" href="class_e_t_sub_item.html#adb2c1b3352378d14c310a97a119e8aed" title="the item is left from the bottom side">navLeaveRight</a>       (
<a name="l00893"></a>00893         <a class="code" href="class_e_t_i___cplx_txt.html" title="class representing a complex text; this may or may not represent an equation">ETI_CplxTxt</a> *   <a class="code" href="class_e_t_sub_item.html#a45307ad1bf08b9516e293d69e60cf030">fth</a>,
<a name="l00894"></a>00894         <a class="code" href="class_e_t_sheet_view.html" title="Widget capable of displaying an ETSheet content.">ETSheetView</a> *   vpa
<a name="l00895"></a>00895         );
<a name="l00896"></a>00896 
<a name="l00897"></a>00897 <span class="comment"></span>
<a name="l00898"></a>00898 <span class="comment">    /// used by kids to request a move up</span>
<a name="l00899"></a>00899 <span class="comment"></span><span class="comment">    /**</span>
<a name="l00900"></a>00900 <span class="comment">   *    If the parent can&#39;t move the selection as there is no</span>
<a name="l00901"></a>00901 <span class="comment">   *    kid above the caller, it should return false</span>
<a name="l00902"></a>00902 <span class="comment">   */</span>
<a name="l00903"></a><a class="code" href="class_e_t_sub_item.html#a9c8058596345f152fe9260e6d4f85839">00903</a>     <span class="keyword">virtual</span> <span class="keywordtype">bool</span>        <a class="code" href="class_e_t_sub_item.html#a9c8058596345f152fe9260e6d4f85839" title="used by kids to request a move up">kidNavReq_up</a>        (
<a name="l00904"></a>00904             <a class="code" href="class_e_t_sheet_view.html" title="Widget capable of displaying an ETSheet content.">ETSheetView</a> * vp, <a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a> * kid)
<a name="l00905"></a>00905     { Q_UNUSED(vp); Q_UNUSED(kid); <span class="keywordflow">return</span> <span class="keyword">false</span>; }
<a name="l00906"></a>00906 
<a name="l00907"></a>00907 <span class="comment"></span>
<a name="l00908"></a>00908 <span class="comment">    /// used by kids to request a move down</span>
<a name="l00909"></a>00909 <span class="comment"></span><span class="comment">    /**</span>
<a name="l00910"></a>00910 <span class="comment">   *    If the parent can&#39;t move the selection as there is no</span>
<a name="l00911"></a>00911 <span class="comment">   *    kid below the caller, it should return false</span>
<a name="l00912"></a>00912 <span class="comment">   */</span>
<a name="l00913"></a><a class="code" href="class_e_t_sub_item.html#a2ba848a73372248b483a684171cef49f">00913</a>     <span class="keyword">virtual</span> <span class="keywordtype">bool</span>        <a class="code" href="class_e_t_sub_item.html#a2ba848a73372248b483a684171cef49f" title="used by kids to request a move down">kidNavReq_down</a>      (
<a name="l00914"></a>00914             <a class="code" href="class_e_t_sheet_view.html" title="Widget capable of displaying an ETSheet content.">ETSheetView</a> * vp, <a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a> * kid)
<a name="l00915"></a>00915     { Q_UNUSED(vp); Q_UNUSED(kid); <span class="keywordflow">return</span> <span class="keyword">false</span>; }
<a name="l00916"></a>00916 
<a name="l00917"></a>00917 <span class="comment"></span>
<a name="l00918"></a>00918 <span class="comment">    /// the sub-item is to become current sub-item in viewport</span>
<a name="l00919"></a>00919 <span class="comment"></span>    <span class="keywordtype">void</span>                <a class="code" href="class_e_t_sub_item.html#aaa26d242a3df778008a48b2df8fd5b36" title="the sub-item is to become current sub-item in viewport">makeCurrent</a>         (<a class="code" href="class_e_t_sheet_view.html" title="Widget capable of displaying an ETSheet content.">ETSheetView</a> * vp);
<a name="l00920"></a>00920 
<a name="l00921"></a>00921 <span class="comment"></span>
<a name="l00922"></a>00922 <span class="comment">    //@}</span>
<a name="l00923"></a>00923 <span class="comment"></span>    <span class="comment">/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */</span>
<a name="l00924"></a>00924 
<a name="l00925"></a>00925 
<a name="l00926"></a>00926 
<a name="l00927"></a>00927 
<a name="l00928"></a>00928     <span class="comment">/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */</span><span class="comment"></span>
<a name="l00929"></a>00929 <span class="comment">    /** @name Others    */</span><span class="comment"></span>
<a name="l00930"></a>00930 <span class="comment">    //@{</span>
<a name="l00931"></a>00931 <span class="comment"></span>    <span class="comment">/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */</span>
<a name="l00932"></a>00932 
<a name="l00933"></a>00933 
<a name="l00934"></a>00934 <span class="keyword">protected</span>:
<a name="l00935"></a>00935 <span class="comment"></span>
<a name="l00936"></a>00936 <span class="comment">    /// called to determine the sub-item that was hit</span>
<a name="l00937"></a>00937 <span class="comment"></span><span class="comment">    /**</span>
<a name="l00938"></a>00938 <span class="comment">   *    The items called with this function are already guaranteed to contain</span>
<a name="l00939"></a>00939 <span class="comment">   *    the point, as the caller is required to check the point before against</span>
<a name="l00940"></a>00940 <span class="comment">   *    sub-items bounding box that is publicly available.</span>
<a name="l00941"></a>00941 <span class="comment">   *</span>
<a name="l00942"></a>00942 <span class="comment">   *    The item checks if any internal kids are containing the point and, if so,</span>
<a name="l00943"></a>00943 <span class="comment">   *    forwards the call to that kid. The final item that has determined that</span>
<a name="l00944"></a>00944 <span class="comment">   *    the point is inside it&#39;s box shall save it&#39;s informations in \b h_data.</span>
<a name="l00945"></a>00945 <span class="comment">   *</span>
<a name="l00946"></a>00946 <span class="comment">   *</span>
<a name="l00947"></a>00947 <span class="comment">   *</span>
<a name="l00948"></a>00948 <span class="comment">   */</span>
<a name="l00949"></a>00949     <span class="keyword">virtual</span> <span class="keywordtype">void</span>        <a class="code" href="class_e_t_sub_item.html#a910ebd737b2d0415bd79303d0d6c66e2" title="called to determine the sub-item that was hit">hitTest</a>     (HtData * h_data) = 0;
<a name="l00950"></a>00950 
<a name="l00951"></a>00951 
<a name="l00952"></a>00952 
<a name="l00953"></a>00953 
<a name="l00954"></a>00954 
<a name="l00955"></a>00955 <span class="keyword">public</span>:
<a name="l00956"></a>00956 <span class="comment"></span>
<a name="l00957"></a>00957 <span class="comment">    /// identifies the type of the sub-item</span>
<a name="l00958"></a>00958 <span class="comment"></span>    <span class="keyword">virtual</span> <a class="code" href="class_e_t_sub_item.html#aa7307b06fe620851acea92b9b6e93ea6" title="enumeration that tells the types of sub-items we know about">SIType</a>      <a class="code" href="class_e_t_sub_item.html#a40b20e46e1e9c2429ba92a4eb564a2f7" title="identifies the type of the sub-item">type</a>        ( <span class="keywordtype">void</span> ) <span class="keyword">const</span> = 0;
<a name="l00959"></a>00959 
<a name="l00960"></a>00960 <span class="comment"></span>
<a name="l00961"></a>00961 <span class="comment">    /// get the bounding box of this item represented in the item</span>
<a name="l00962"></a>00962 <span class="comment"></span><span class="comment">    /**</span>
<a name="l00963"></a>00963 <span class="comment">    *   The function will compute the bounding box of the sub-item represented</span>
<a name="l00964"></a>00964 <span class="comment">    *   in scene coordinates by iterating the father-son bond up until</span>
<a name="l00965"></a>00965 <span class="comment">    *   the very first root item is found. These are the coordinates in</span>
<a name="l00966"></a>00966 <span class="comment">    *   ETI_CplxTxt system.</span>
<a name="l00967"></a>00967 <span class="comment">    */</span>
<a name="l00968"></a>00968     QRectF              <a class="code" href="class_e_t_sub_item.html#a6755d46623943a100688e7fd0416cbdd" title="get the bounding box of this item represented in the item">boxInItem</a>   (<a class="code" href="class_e_t_i___cplx_txt.html" title="class representing a complex text; this may or may not represent an equation">ETI_CplxTxt</a> ** <a class="code" href="class_e_t_sub_item.html#a45307ad1bf08b9516e293d69e60cf030">fth</a>) <span class="keyword">const</span>;
<a name="l00969"></a>00969 
<a name="l00970"></a>00970 <span class="comment"></span>
<a name="l00971"></a>00971 <span class="comment">    /// get the bounding box of this sub-item represented in the scene</span>
<a name="l00972"></a>00972 <span class="comment"></span><span class="comment">    /**</span>
<a name="l00973"></a>00973 <span class="comment">    *   The function will compute the bounding box of the sub-item represented</span>
<a name="l00974"></a>00974 <span class="comment">    *   in scene coordinates by iterating the father-son bond up until</span>
<a name="l00975"></a>00975 <span class="comment">    *   the very first root item is found. These are the coordinates in</span>
<a name="l00976"></a>00976 <span class="comment">    *   ETI_CplxTxt system that are transformed to scene coordinates.</span>
<a name="l00977"></a>00977 <span class="comment">    */</span>
<a name="l00978"></a>00978     QRectF              <a class="code" href="class_e_t_sub_item.html#a45d5f17e954c49f22904ee97ac04d263" title="get the bounding box of this sub-item represented in the scene">boxInScene</a>  (<a class="code" href="class_e_t_i___cplx_txt.html" title="class representing a complex text; this may or may not represent an equation">ETI_CplxTxt</a> ** <a class="code" href="class_e_t_sub_item.html#a45307ad1bf08b9516e293d69e60cf030">fth</a>) <span class="keyword">const</span>;
<a name="l00979"></a>00979 
<a name="l00980"></a>00980 <span class="comment"></span>
<a name="l00981"></a>00981 <span class="comment">    /// returns the position of the reference point given child in this item&#39;s coordinates</span>
<a name="l00982"></a>00982 <span class="comment"></span><span class="comment">    /**</span>
<a name="l00983"></a>00983 <span class="comment">    *   This function is intended for complex items; the argument needs to be a</span>
<a name="l00984"></a>00984 <span class="comment">    *   direct kid. For simple items the default implementation will do.</span>
<a name="l00985"></a>00985 <span class="comment">    *</span>
<a name="l00986"></a>00986 <span class="comment">    *   The function is not required to check if the provided item is trully a kid,</span>
<a name="l00987"></a>00987 <span class="comment">    *   as it is assumed the caller has already done that.</span>
<a name="l00988"></a>00988 <span class="comment">    */</span>
<a name="l00989"></a>00989     <span class="keyword">virtual</span> QPointF     <a class="code" href="class_e_t_sub_item.html#a3fdaeb353bed6e19a583e2b371c80583" title="returns the position of the reference point given child in this item&#39;s coordinates">subIRefPt</a>   (<span class="keyword">const</span> <a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a> * p_kid) <span class="keyword">const</span>;
<a name="l00990"></a>00990 
<a name="l00991"></a>00991 <span class="comment"></span>
<a name="l00992"></a>00992 <span class="comment">    //@}</span>
<a name="l00993"></a>00993 <span class="comment"></span>    <span class="comment">/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */</span>
<a name="l00994"></a>00994 
<a name="l00995"></a>00995 
<a name="l00996"></a>00996 
<a name="l00997"></a>00997 
<a name="l00998"></a>00998     <span class="comment">/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */</span><span class="comment"></span>
<a name="l00999"></a>00999 <span class="comment">    /** @name Save and load */</span><span class="comment"></span>
<a name="l01000"></a>01000 <span class="comment">    //@{</span>
<a name="l01001"></a>01001 <span class="comment"></span>    <span class="comment">/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */</span>
<a name="l01002"></a>01002 
<a name="l01003"></a>01003 <span class="keyword">public</span>:
<a name="l01004"></a>01004 
<a name="l01005"></a>01005 <span class="comment"></span>
<a name="l01006"></a>01006 <span class="comment">    /// updates the properties of specified item based on DOM element&#39;s content</span>
<a name="l01007"></a>01007 <span class="comment"></span>    <span class="keyword">static</span> <span class="keywordtype">void</span>         <a class="code" href="class_e_t_sub_item.html#af5290d8caa173f73da2ba43616b4be47" title="updates the properties of specified item based on DOM element&#39;s content">loadXMLCmn</a>          (
<a name="l01008"></a>01008         <a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a> *         item,
<a name="l01009"></a>01009         QDomElement         dom_e
<a name="l01010"></a>01010         );
<a name="l01011"></a>01011 
<a name="l01012"></a>01012 <span class="comment"></span>
<a name="l01013"></a>01013 <span class="comment">    /// updates the properties of specified item based on DOM element&#39;s content</span>
<a name="l01014"></a>01014 <span class="comment"></span>    <span class="keyword">static</span> <a class="code" href="class_e_t_sub_item.html" title="class representing the common interface exposed by all sub-items of a ETI_CplxTxt">ETSubItem</a> *  <a class="code" href="class_e_t_sub_item.html#ae6ef96172fec911255cdfd2791bb9a5d" title="updates the properties of specified item based on DOM element&#39;s content">loadXMLByType</a>           (
<a name="l01015"></a>01015         QDomElement         dom_e
<a name="l01016"></a>01016         );
<a name="l01017"></a>01017 
<a name="l01018"></a>01018 <span class="comment"></span>
<a name="l01019"></a>01019 <span class="comment">    /// saves the properties of this item to provided DOM element</span>
<a name="l01020"></a>01020 <span class="comment"></span><span class="comment">    /**</span>
<a name="l01021"></a>01021 <span class="comment">    *   Internally, the inherited class needs to call saveXMLCmn()</span>
<a name="l01022"></a>01022 <span class="comment">    *   to save common properties hosted by the ETSubItem class</span>
<a name="l01023"></a>01023 <span class="comment">    */</span>
<a name="l01024"></a>01024     <span class="keyword">virtual</span> <span class="keywordtype">void</span>        <a class="code" href="class_e_t_sub_item.html#aa0587a84eb672f8ca941e662797a4579" title="saves the properties of this item to provided DOM element">saveXML</a>         (
<a name="l01025"></a>01025         QDomElement         dom_e
<a name="l01026"></a>01026         ) = 0;
<a name="l01027"></a>01027 
<a name="l01028"></a>01028 
<a name="l01029"></a>01029 <span class="keyword">protected</span>:
<a name="l01030"></a>01030 <span class="comment"></span>
<a name="l01031"></a>01031 <span class="comment">    /// saves common properties to provided DOM element</span>
<a name="l01032"></a>01032 <span class="comment"></span>    <span class="keywordtype">void</span>                <a class="code" href="class_e_t_sub_item.html#a02697af655fba4041b231ac18b529691" title="saves common properties to provided DOM element">saveXMLCmn</a>      (
<a name="l01033"></a>01033         QDomElement         dom_e
<a name="l01034"></a>01034         );
<a name="l01035"></a>01035 <span class="comment"></span>
<a name="l01036"></a>01036 <span class="comment">    //@}</span>
<a name="l01037"></a>01037 <span class="comment"></span>    <span class="comment">/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */</span>
<a name="l01038"></a>01038 
<a name="l01039"></a>01039 
<a name="l01040"></a>01040 
<a name="l01041"></a>01041 
<a name="l01042"></a>01042 
<a name="l01043"></a>01043     <span class="comment">/*  FUNCTIONS    ======================================================= */</span>
<a name="l01044"></a>01044     <span class="comment">//</span>
<a name="l01045"></a>01045     <span class="comment">//</span>
<a name="l01046"></a>01046     <span class="comment">//</span>
<a name="l01047"></a>01047     <span class="comment">//</span>
<a name="l01048"></a>01048 
<a name="l01049"></a>01049 };  <span class="comment">/*  class ETSubItem */</span>
<a name="l01050"></a>01050 
<a name="l01051"></a>01051 <span class="comment">/*  CLASS    =============================================================== */</span>
<a name="l01052"></a>01052 <span class="comment">//</span>
<a name="l01053"></a>01053 <span class="comment">//</span>
<a name="l01054"></a>01054 <span class="comment">//</span>
<a name="l01055"></a>01055 <span class="comment">//</span>
<a name="l01056"></a>01056 <span class="preprocessor">#endif // __ETSUBITEM_INC__</span>
<a name="l01057"></a>01057 <span class="preprocessor"></span><span class="comment">/* ------------------------------------------------------------------------- */</span>
<a name="l01058"></a>01058 <span class="comment">/* ========================================================================= */</span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="_e_t_sub_item_8h.html">ETSubItem.h</a>      </li>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

    <li class="footer">Generated on Sun Oct 23 2011 22:06:48 for EquTemper by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </li>
   </ul>
 </div>
</body>
</html>
